From 601a09fd07960d3aadcf972ba7c72dcea9976aef Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 21 May 2021 12:19:44 -0400 Subject: Enhance toString methods in factory classes The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn --- .../org/onap/policy/common/utils/coder/StandardCoderTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'utils/src/test') diff --git a/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java b/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java index a468f0b4..33c7331e 100644 --- a/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java +++ b/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP PAP * ================================================================================ - * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.TreeMap; +import lombok.ToString; import org.junit.Before; import org.junit.Test; @@ -358,13 +359,9 @@ public class StandardCoderTest { } + @ToString private static class MyObject { private String abc; - - @Override - public String toString() { - return "MyObject [abc=" + abc + "]"; - } } public static class MyMap { -- cgit 1.2.3-korg