public void tearDown() throws Exception {
}
private void baseTestCreateUpdateDeleteCA(String id) throws Exception {
// CREATE
SSLCert cert = new SSLCert();
cert.setId(id);
cert.setContent("iurezahfskdqhflk");
BasicResponse response = given()
.contentType("application/xml")
.body(cert, ObjectMapper.JAXB)
.expect()
.statusCode(200)
.rootPath("response")
.body("status", equalTo("SUCCESS"))
.log().ifError()
.when()
.post("/certs")
.andReturn()
.as(BasicResponse.class, ObjectMapper.JAXB);
assertNotNull(response);
assertEquals("SUCCESS", response.getStatus());
if (id != null)
{
assertEquals(id, response.getId());
}
else
{
assertNotNull(response.getId());
id = response.getId();
}
// UPDATE
cert.setContent(null);
cert.setDisplayName("titi");
response = given()
.contentType("application/xml")
.body(cert, ObjectMapper.JAXB)
.expect()