SchemaMappingTO schemaMappingTO = new SchemaMappingTO();
schemaMappingTO.setExtAttrName("uid");
schemaMappingTO.setIntAttrName("userId");
schemaMappingTO.setIntMappingType(IntMappingType.UserSchema);
schemaMappingTO.setAccountid(true);
resourceTO.addMapping(schemaMappingTO);
// ----------------------------------------
// ----------------------------------------
// Check connection without saving the resource ....
// ----------------------------------------