summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
index 2df28d973..a60aa7ea6 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
@@ -173,7 +173,15 @@ public class AaiControllerTest {
@Test
public void getSpecificPnf_shouldReturnPnfObjectForPnfId() throws Exception {
String pnfId = "MyPnfId";
- Pnf pnf = createPnf(pnfId);
+ Pnf pnf = Pnf.builder()
+ .withPnfId(pnfId)
+ .withPnfName("TestPnf")
+ .withPnfName2("pnfName2")
+ .withPnfName2Source("pnfNameSource")
+ .withEquipModel("model")
+ .withEquipType("type")
+ .withEquipVendor("vendor")
+ .build();
AaiResponse<Pnf> aaiResponse = new AaiResponse<>(pnf, "", HttpStatus.OK.value());
given(aaiService.getSpecificPnf(pnfId)).willReturn(aaiResponse);
@@ -197,13 +205,6 @@ public class AaiControllerTest {
.andExpect(content().string(expectedErrorMessage));
}
- private Pnf createPnf(String pnfId) {
- Pnf pnf = new Pnf();
- pnf.setPnfId(pnfId);
- pnf.setPnfName("TestPnf");
- return pnf;
- }
-
public void getPNFInstances_shouldReturnOKResponseFromAAIService() throws Exception {
String globalCustomerId = "testCustomerId";
String serviceType = "testServiceType";