}
@Test
public void testSecondCreateAndDeleteAuth() throws Exception {
Auth data = newAuthProvision("reusableId");
// Create step
BasicResponse response = given()
.contentType("application/xml")
.body(data, ObjectMapper.JAXB)
.expect()
.statusCode(200)
.rootPath("response")
.body("status", equalTo("SUCCESS"))
.body("apiID", notNullValue())
.log().ifError()
.when()
.post("")
.andReturn()
.as(BasicResponse.class, ObjectMapper.JAXB);
assertNotNull(response);
assertEquals("SUCCESS", response.getStatus());
// Delete step
response = given()
.contentType("application/xml")
.expect()
.statusCode(200)
.rootPath("response")
.body("status", equalTo("SUCCESS"))
.log().ifError()
.when()
.delete("/" + data.getId())
.andReturn()
.as(BasicResponse.class, ObjectMapper.JAXB);
assertNotNull(response);
assertEquals("SUCCESS", response.getStatus());