diff options
Diffstat (limited to 'prh-aai-client/src')
2 files changed, 14 insertions, 13 deletions
diff --git a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/config/AAIHttpClientConfiguration.java b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/config/AAIHttpClientConfiguration.java index 9f93f896..4b17b4b6 100644 --- a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/config/AAIHttpClientConfiguration.java +++ b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/config/AAIHttpClientConfiguration.java @@ -20,15 +20,16 @@ package org.onap.dcaegen2.services.config; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.immutables.value.Value; -import org.springframework.stereotype.Component; - import java.io.Serializable; +import org.springframework.stereotype.Component; @Component @Value.Immutable(prehash = true) -@Value.Style(stagedBuilder = true) +@Value.Style(builder = "new") +@JsonDeserialize(builder = ImmutableAAIHttpClientConfiguration.Builder.class) public abstract class AAIHttpClientConfiguration implements Serializable { private static final long serialVersionUID = 1L; diff --git a/prh-aai-client/src/test/java/org/onap/dcaegen2/services/service/config/AAIHttpClientConfigurationTest.java b/prh-aai-client/src/test/java/org/onap/dcaegen2/services/service/config/AAIHttpClientConfigurationTest.java index a759aca5..76c2969a 100644 --- a/prh-aai-client/src/test/java/org/onap/dcaegen2/services/service/config/AAIHttpClientConfigurationTest.java +++ b/prh-aai-client/src/test/java/org/onap/dcaegen2/services/service/config/AAIHttpClientConfigurationTest.java @@ -36,21 +36,21 @@ public class AAIHttpClientConfigurationTest { @BeforeAll public static void init() { - client = ImmutableAAIHttpClientConfiguration.builder() - .aaiHost(AAI_HOST) - .aaiHostPortNumber(PORT) - .aaiProtocol(PROTOCOL) - .aaiUserName(USER_NAME_PASSWORD) - .aaiUserPassword(USER_NAME_PASSWORD) - .aaiIgnoreSSLCertificateErrors(true) - .build(); + client = new ImmutableAAIHttpClientConfiguration.Builder() + .aaiHost(AAI_HOST) + .aaiHostPortNumber(PORT) + .aaiProtocol(PROTOCOL) + .aaiUserName(USER_NAME_PASSWORD) + .aaiUserPassword(USER_NAME_PASSWORD) + .aaiIgnoreSSLCertificateErrors(true) + .build(); } @Test public void testGetters_success() { - Assertions.assertEquals(AAI_HOST,client.aaiHost()); + Assertions.assertEquals(AAI_HOST, client.aaiHost()); Assertions.assertEquals(PORT, client.aaiHostPortNumber()); - Assertions.assertEquals(PROTOCOL,client.aaiProtocol()); + Assertions.assertEquals(PROTOCOL, client.aaiProtocol()); Assertions.assertEquals(USER_NAME_PASSWORD, client.aaiUserName()); Assertions.assertEquals(USER_NAME_PASSWORD, client.aaiUserPassword()); Assertions.assertEquals(true, client.aaiIgnoreSSLCertificateErrors()); |