baseTestCreateUpdateDeleteCA(null);
}
private void baseTestCreateUpdateDeleteCRL(String id) throws Exception {
// CREATE
SSLCRL crl = new SSLCRL();
crl.setId(id);
String content = "abc";
crl.setContent(content);
BasicResponse response = given()
.contentType("application/xml")
.body(crl, ObjectMapper.JAXB)
.expect()
.statusCode(200)
.rootPath("response")
.body("status", equalTo("SUCCESS"))
.log().ifError()
.when()
.post("/crls")
.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
crl.setContent(null);
crl.setDisplayName("toto");
response = given()
.contentType("application/xml")
.body(crl, ObjectMapper.JAXB)
.expect()