diff options
author | 2019-02-18 12:29:31 +0100 | |
---|---|---|
committer | 2019-02-18 12:29:31 +0100 | |
commit | 619d5f7dd8a03c4d53ff9adacfd5d208f1371735 (patch) | |
tree | 0530da744a122ca1ff316e5c69f98d89a696f9d7 /vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java | |
parent | e9381e08b6a48468ff6f3ccaa03d0b19dd47d535 (diff) |
PombaReqest and ServiceInstance improvements
- fix encapsulation issues
- make object immutable
Change-Id: I7f66aa7ec5e0ba63a9178ad27c8a9466f04e0869
Issue-ID: VID-422
Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java index b1c4139b7..4e832d5f7 100644 --- a/vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/aai/PombaClientImplTest.java @@ -2,9 +2,7 @@ * ============LICENSE_START======================================================= * VID * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Modifications Copyright 2019 Nokia + * Copyright (C) 2019 Nokia * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,19 +72,18 @@ public class PombaClientImplTest { ServiceInstance serviceInstance2 = createServiceInstance("serviceType2", "serviceInstanceId2", "customerId2", "modelVersion2", "modelInvariantId2"); - PombaRequest pombaRequest = new PombaRequest(); - pombaRequest.serviceInstanceList = Lists.newArrayList(serviceInstance1, serviceInstance2); + PombaRequest pombaRequest = new PombaRequest(Lists.newArrayList(serviceInstance1, serviceInstance2)); return pombaRequest; } private ServiceInstance createServiceInstance(String serviceType, String serviceInstanceId, String customerId, String modelVersionId, String modelInvariantId) { - ServiceInstance serviceInstance = new ServiceInstance(); - serviceInstance.serviceType = serviceType; - serviceInstance.serviceInstanceId = serviceInstanceId; - serviceInstance.customerId = customerId; - serviceInstance.modelInvariantId = modelInvariantId; - serviceInstance.modelVersionId = modelVersionId; + ServiceInstance serviceInstance = new ServiceInstance( + serviceInstanceId, + modelVersionId, + modelInvariantId, + customerId, + serviceType); return serviceInstance; } |