schemaTO = restTemplate.getForObject(BASE_URL + "schema/user/read/authTestSchema.json", SchemaTO.class);
assertNotNull(schemaTO);
// 5. update the schema create above (as user) - failure
HttpClientErrorException exception = null;
try {
restTemplate.postForObject(BASE_URL + "schema/role/update", schemaTO, SchemaTO.class);
} catch (HttpClientErrorException e) {
exception = e;
}
assertNotNull(exception);
assertEquals(HttpStatus.FORBIDDEN, exception.getStatusCode());
// reset admin credentials for restTemplate
super.resetRestTemplate();
userTO = restTemplate.getForObject(BASE_URL + "user/read/{userId}.json", UserTO.class, userTO.getId());