+ def 'DMI POST operation.'() {
+ given: 'a POST url'
+ def getResourceDataUrl = 'http://some-uri/createResourceDataUrl'
+ and: 'dmi properties'
+ setupTestConfigurationData()
+ and: 'the rest template returns a valid response entity'
+ def mockResponseEntity = Mock(ResponseEntity)
+ mockRestTemplate.postForEntity(getResourceDataUrl, _ as HttpEntity, String.class) >> mockResponseEntity
+ when: 'POST operation is invoked'
+ def result = objectUnderTest.postOperationWithJsonData(getResourceDataUrl, 'json-data', new HttpHeaders())
+ then: 'the output of the method is equal to the output from the test template'
+ result == mockResponseEntity
+ }
+