final ResourceTO resourceTO = new ResourceTO();
resourceTO.setName(resourceName);
resourceTO.setConnectorId(107L);
MappingTO mapping = new MappingTO();
MappingItemTO item = new MappingItemTO();
item.setIntAttrName("aLong");
item.setIntMappingType(IntMappingType.UserSchema);
item.setPurpose(MappingPurpose.PROPAGATION);
item.setAccountid(true);
mapping.setAccountIdItem(item);
item = new MappingItemTO();
item.setExtAttrName("USERNAME");
item.setIntAttrName("username");
item.setIntMappingType(IntMappingType.Username);
item.setPurpose(MappingPurpose.PROPAGATION);
mapping.getItems().add(item);
item = new MappingItemTO();
item.setExtAttrName("EMAIL");
item.setIntAttrName("rvirtualdata");
item.setIntMappingType(IntMappingType.RoleVirtualSchema);
item.setPurpose(MappingPurpose.PROPAGATION);
mapping.getItems().add(item);
resourceTO.setUmapping(mapping);
assertNotNull(getObject(resourceService.create(resourceTO), ResourceTO.class, resourceService));
// -------------------------------------------