@Test
public void testConnectorObjectName() throws Exception {

    InputStream inputStream = ObjectClassInfoHelperTest.class.getResourceAsStream("/config/SystemSchemaConfiguration.json");
    Assert.assertNotNull(inputStream);
    ObjectMapper mapper = new ObjectMapper();
    JsonValue configuration = new JsonValue(mapper.readValue(inputStream, Map.class));
    ObjectClassInfoHelper helper = new ObjectClassInfoHelper(configuration.get("objectTypes").get("__ACCOUNT__").asMap());
    JsonValue source = new JsonValue(new HashMap<String, Object>());
    source.put(ServerConstants.OBJECT_PROPERTY_ID, "ID_NAME");
    Pair<ObjectClass, Set<Attribute>> co = helper.build(UpdateApiOp.class, source, null);
    assertThat(co.second).doesNotSatisfy(new Condition<Collection<?>>() {
        @Override
        public boolean matches(Collection<?> value) {
            return value.contains(new Name("NAME_NAME"));
        }
    });
    source.put("__NAME__", "NAME_NAME");
    co = helper.build(UpdateApiOp.class, source, null);
    assertThat(co.second).contains(new Name("NAME_NAME"));
}