}
@Test
public void createOverridingProps() {
String resourceName = "overriding-conn-conf-target-resource-create";
ResourceTO resourceTO = new ResourceTO();
MappingTO mapping = new MappingTO();
MappingItemTO item = new MappingItemTO();
item.setExtAttrName("uid");
item.setIntAttrName("userId");
item.setIntMappingType(IntMappingType.UserSchema);
item.setPurpose(MappingPurpose.BOTH);
mapping.addItem(item);
item = new MappingItemTO();
item.setExtAttrName("username");
item.setIntAttrName("fullname");
item.setIntMappingType(IntMappingType.UserId);
item.setAccountid(true);
item.setPurpose(MappingPurpose.BOTH);
mapping.setAccountIdItem(item);
item = new MappingItemTO();
item.setExtAttrName("fullname");
item.setIntAttrName("cn");
item.setIntMappingType(IntMappingType.UserSchema);
item.setAccountid(false);
item.setPurpose(MappingPurpose.BOTH);
mapping.addItem(item);
resourceTO.setName(resourceName);
resourceTO.setConnectorId(102L);
resourceTO.setUmapping(mapping);
ConnConfProperty p = new ConnConfProperty();
ConnConfPropSchema schema = new ConnConfPropSchema();
schema.setType("java.lang.String");
schema.setName("endpoint");
schema.setRequired(true);
p.setSchema(schema);
p.setValues(Collections.singletonList("http://invalidurl/"));
Set<ConnConfProperty> connectorConfigurationProperties = new HashSet<ConnConfProperty>(Arrays.asList(p));
resourceTO.setConnectorConfigurationProperties(connectorConfigurationProperties);
Response response = resourceService.create(resourceTO);
ResourceTO actual = getObject(response, ResourceTO.class, resourceService);
assertNotNull(actual);
// check the existence
actual = resourceService.read(resourceName);