From 4480a6cac93693cef4515a0f5588c58bbe270f06 Mon Sep 17 00:00:00 2001 From: Tomasz Gwozdecki Date: Wed, 5 Jun 2019 02:42:32 -0400 Subject: junits for AaiController -Added new test for getSpecificPnf method Change-Id: I1837a364673c3dd04b559eacccd7baeeeb82208f Issue-ID: VID-478 Signed-off-by: Tomasz Gwozdecki --- .../src/main/java/org/onap/vid/controller/AaiController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'vid-app-common/src/main') diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java index ca40b7d0c..4a4f3d300 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java @@ -401,13 +401,12 @@ public class AaiController extends RestrictedBaseController { @RequestMapping(value = "/aai_get_pnfs/pnf/{pnf_id}", method = RequestMethod.GET) public ResponseEntity getSpecificPnf(@PathVariable("pnf_id") String pnfId) { - AaiResponse resp; ResponseEntity re; try { - resp = aaiService.getSpecificPnf(pnfId); + AaiResponse resp = aaiService.getSpecificPnf(pnfId); re = new ResponseEntity<>(resp.getT(), HttpStatus.valueOf(resp.getHttpCode())); } catch (Exception e) { - return new ResponseEntity(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); + return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); } return re; } -- cgit 1.2.3-korg