X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2Fclient%2FDmiRestClientSpec.groovy;h=389086c7701ec71211e33712941be0f1d48cc286;hb=82ebf531110deba98086f8f7cb9c745519bbc4f4;hp=8c46178ddd9a4bb54c0e3bf88563336fdd2360ac;hpb=4207fab422760b17187d37776ebc1867b995bba1;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy index 8c46178dd..389086c77 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy @@ -46,7 +46,7 @@ class DmiRestClientSpec extends Specification { def 'DMI POST operation'() { given: 'the rest template returns a valid response entity' def mockResponseEntity = Mock(ResponseEntity) - mockRestTemplate.exchange(resourceUrl, HttpMethod.POST, _ as HttpEntity, String.class) >> mockResponseEntity + mockRestTemplate.exchange(resourceUrl, HttpMethod.POST, _ as HttpEntity, Object.class) >> mockResponseEntity when: 'POST operation is invoked' def result = objectUnderTest.postOperation(resourceUrl, new HttpHeaders()) then: 'the output of the method is equal to the output from the rest template' @@ -56,7 +56,7 @@ class DmiRestClientSpec extends Specification { def 'DMI POST operation with JSON.'() { given: 'the rest template returns a valid response entity' def mockResponseEntity = Mock(ResponseEntity) - mockRestTemplate.postForEntity(resourceUrl, _ as HttpEntity, String.class) >> mockResponseEntity + mockRestTemplate.postForEntity(resourceUrl, _ as HttpEntity, Object.class) >> mockResponseEntity when: 'POST operation is invoked' def result = objectUnderTest.postOperationWithJsonData(resourceUrl, 'json-data', new HttpHeaders()) then: 'the output of the method is equal to the output from the test template'