+ @Test
+ fun testDeleteWith204StatusAndResponseAsString() {
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
+ val headers = mutableMapOf<String, String>()
+ headers["X-Transaction-Id"] = "1234"
+ val response = restClientService.exchangeResource(
+ HttpMethod.DELETE.name,
+ "/sample/name", ""
+ )
+ assertEquals(response.status, 204)
+ assertEquals(response.body, "")
+ }
+
+ @Test
+ fun testDeleteWith204StatusAndResponseAsCustomerWithDefaultConstructor() {
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
+ val headers = mutableMapOf<String, String>()
+ headers["X-Transaction-Id"] = "1234"
+ runBlocking {
+ val response = restClientService.exchangeNB(
+ HttpMethod.DELETE.name,
+ "/sample/customersWithDefaultConstructor", "", headers, CustomerWithDefaultConstructor::class.java
+ )
+ assertEquals(response.status, 204)
+ assertEquals(response.body, CustomerWithDefaultConstructor())
+ }
+ }
+
+ // @Test
+ fun testDeleteWith204StatusAndResponseAsCustomerWithoutDefaultConstructor() {
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
+ val headers = mutableMapOf<String, String>()
+ headers["X-Transaction-Id"] = "1234"
+ runBlocking {
+ val response = restClientService.exchangeNB(
+ HttpMethod.DELETE.name,
+ "/sample/customersWithoutDefaultConstructor", "", headers, CustomerWithoutDefaultConstructor::class.java
+ )
+ assertEquals(response.status, 204)
+ assertEquals(response.body, CustomerWithoutDefaultConstructor(""))
+ }
+ }