diff options
author | leventecsanyi <levente.csanyi@est.tech> | 2024-06-21 10:50:06 +0200 |
---|---|---|
committer | Levente Csanyi <levente.csanyi@est.tech> | 2024-07-25 09:40:23 +0000 |
commit | b33ea92a29a2724750554ebb412cf841fbe8c2a8 (patch) | |
tree | 7e41b2a211eb3166ff6429572b77ae853f44ad1a /cps-ncmp-service | |
parent | d3c3d49849ce81b82ec1e5c40b885ee08c368b09 (diff) |
Integration test for the writeDataJob
- added Stub controller
- created integration test for writeDataJob
Issue-ID: CPS-2236
Change-Id: I067a11dc5bfe629d50128cf303b2a81abc75a348
Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
Diffstat (limited to 'cps-ncmp-service')
2 files changed, 3 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/datajobs/models/SubJobWriteRequest.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/datajobs/models/SubJobWriteRequest.java index 432b21b8c0..0e0498ec49 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/datajobs/models/SubJobWriteRequest.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/datajobs/models/SubJobWriteRequest.java @@ -23,7 +23,7 @@ package org.onap.cps.ncmp.api.datajobs.models; import java.util.Collection; /** - * Response data for a write operation by the DMI Plugin. + * Request data for a write operation by the DMI Plugin. * * @param dataAcceptType Define the data response accept type. * e.g. "application/vnd.3gpp.object-tree-hierarchical+json", diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/datajobs/DmiSubJobRequestHandler.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/datajobs/DmiSubJobRequestHandler.java index 1f9ea11d4f..1624ce8ae6 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/datajobs/DmiSubJobRequestHandler.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/datajobs/DmiSubJobRequestHandler.java @@ -72,7 +72,8 @@ public class DmiSubJobRequestHandler { jsonObjectMapper.asJsonString(subJobWriteRequest), OperationType.CREATE, NO_AUTH_HEADER); - final SubJobWriteResponse subJobWriteResponse = (SubJobWriteResponse) responseEntity.getBody(); + final SubJobWriteResponse subJobWriteResponse = jsonObjectMapper + .convertToValueType(responseEntity.getBody(), SubJobWriteResponse.class); log.debug("Sub job write response: {}", subJobWriteResponse); subJobWriteResponses.add(subJobWriteResponse); }); |