diff options
author | Jim Hahn <jrh3@att.com> | 2021-05-21 12:19:44 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-05-21 13:08:54 -0400 |
commit | 601a09fd07960d3aadcf972ba7c72dcea9976aef (patch) | |
tree | 35d368fc7d8c7dd40e1f76b852ad03bee8780e2e /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java | |
parent | c7d24b07377cb00ce4c0c531c6d3dff25e04dc12 (diff) |
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 <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java index 7ca131ec..8d65bbd6 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/YamlJacksonHandlerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019 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. @@ -31,6 +31,7 @@ import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import javax.ws.rs.core.MediaType; +import lombok.ToString; import org.junit.Test; import org.onap.policy.common.endpoints.http.server.YamlJacksonHandler; import org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler; @@ -106,6 +107,7 @@ public class YamlJacksonHandlerTest { /** * This class includes all policy-specific gson annotations. */ + @ToString public static class Data { protected int id; @@ -144,11 +146,6 @@ public class YamlJacksonHandlerTest { props.put(name, value); } - - @Override - public String toString() { - return "Data [id=" + id + ", value=" + value + ", props=" + props + "]"; - } } private static class MyMap { |