diff options
Diffstat (limited to 'prh-commons/src/main/java/org')
2 files changed, 9 insertions, 0 deletions
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/CommonFunctions.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/CommonFunctions.java index 9e5a73da..66a0a998 100644 --- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/CommonFunctions.java +++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/CommonFunctions.java @@ -30,6 +30,12 @@ public class CommonFunctions { private CommonFunctions() { } + /** + * Method for serialization object by GSON. + * + * @param consumerDmaapModel - object which will be serialized + * @return string from serialization + */ public static String createJsonBody(ConsumerDmaapModel consumerDmaapModel) { GsonBuilder gsonBuilder = new GsonBuilder(); ServiceLoader.load(TypeAdapterFactory.class).forEach(gsonBuilder::registerTypeAdapterFactory); diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java index 76f51749..569a7a7c 100644 --- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java +++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java @@ -26,6 +26,9 @@ public class ConsumerDmaapModelForUnitTest implements ConsumerDmaapModel { private final String ipv4; private final String ipv6; + /** + * Class for testing serialization of ConsumerDmaapModel. + */ public ConsumerDmaapModelForUnitTest() { this.pnfName = "NOKnhfsadhff"; this.ipv4 = "256.22.33.155"; |