summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorTomasz Gwozdecki <tomasz.gwozdecki@nokia.com>2019-06-05 02:42:32 -0400
committerTomasz Gwozdecki <tomasz.gwozdecki@nokia.com>2019-06-05 02:42:32 -0400
commit4480a6cac93693cef4515a0f5588c58bbe270f06 (patch)
tree02de13d7fa12b064c08afd79862e9dbb30d44f54 /vid-app-common/src/main
parentfc596b9d71dddc87b58de486f0f5af26ea8755b4 (diff)
junits for AaiController
-Added new test for getSpecificPnf method Change-Id: I1837a364673c3dd04b559eacccd7baeeeb82208f Issue-ID: VID-478 Signed-off-by: Tomasz Gwozdecki <tomasz.gwozdecki@nokia.com>
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java5
1 files changed, 2 insertions, 3 deletions
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<Pnf> resp;
ResponseEntity<Pnf> re;
try {
- resp = aaiService.getSpecificPnf(pnfId);
+ AaiResponse<Pnf> resp = aaiService.getSpecificPnf(pnfId);
re = new ResponseEntity<>(resp.getT(), HttpStatus.valueOf(resp.getHttpCode()));
} catch (Exception e) {
- return new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+ return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
}
return re;
}