}
}
@Test
public void issue258() {
SchemaTO schemaTO = new SchemaTO();
schemaTO.setName("schema_issue258");
schemaTO.setType(AttributeSchemaType.Double);
Response response = createSchema(AttributableType.USER, SchemaType.NORMAL, schemaTO);
schemaTO = getObject(response, SchemaTO.class, schemaService);
assertNotNull(schemaTO);
UserTO userTO = UserTestITCase.getUniqueSampleTO("issue258@syncope.apache.org");
userTO.addAttribute(attributeTO(schemaTO.getName(), "1.2"));
userTO = createUser(userTO);
assertNotNull(userTO);
schemaTO.setType(AttributeSchemaType.Long);
try {
schemaService.update(AttributableType.USER, SchemaType.NORMAL, schemaTO.getName(), schemaTO);
fail("This should not be reacheable");
} catch (SyncopeClientCompositeErrorException scce) {
SyncopeClientException sce = scce.getException(SyncopeClientExceptionType.InvalidUSchema);
assertNotNull(sce);
}