### Question:
ObjectClassInfoHelper { public Pair<ObjectClass, Set<Attribute>> build(Class<? extends APIOperation> operation, JsonValue source, CryptoService cryptoService) throws Exception { String nameValue = null; JsonValue o = source.get(nameAttribute); if (o.isString()) { nameValue = Id.unescapeUid(o.asString()); } if (CreateApiOp.class.isAssignableFrom(operation) && StringUtil.isBlank(o.asString())) { throw new JsonResourceException(JsonResourceException.BAD_REQUEST, "Required NAME attribute is missing"); } logger.trace("Build ConnectorObject {} for {}", nameValue, operation.getSimpleName()); Map<String, Attribute> builder = new HashMap<String, Attribute>(); Set<String> keySet = source.required().asMap().keySet(); if (CreateApiOp.class.isAssignableFrom(operation)) { builder.put(Name.NAME, new Name(nameValue)); for (AttributeInfoHelper attributeInfo : attributes) { if (Name.NAME.equals(attributeInfo.getName()) || Uid.NAME.equals(attributeInfo.getName()) || !keySet.contains(attributeInfo.getName())) { continue; } if (attributeInfo.getAttributeInfo().isCreateable()) { Object v = source.get(attributeInfo.getName()); if (null == v && attributeInfo.getAttributeInfo().isRequired()) { throw new IllegalArgumentException("Required attribute {" + attributeInfo.getName() + "} value is null"); } builder.put(attributeInfo.getName(), attributeInfo.build(v, cryptoService)); } } } else if (UpdateApiOp.class.isAssignableFrom(operation)) { if (null != nameValue) { builder.put(Name.NAME, new Name(nameValue)); } for (AttributeInfoHelper attributeInfo : attributes) { if (Name.NAME.equals(attributeInfo.getName()) || Uid.NAME.equals(attributeInfo.getName()) || !keySet.contains(attributeInfo.getName())) { continue; } if (attributeInfo.getAttributeInfo().isUpdateable()) { Object v = source.get(attributeInfo.getName()); builder.put(attributeInfo.getName(), attributeInfo.build(v, cryptoService)); } } } else { for (AttributeInfoHelper attributeInfo : attributes) { if (Name.NAME.equals(attributeInfo.getName()) || Uid.NAME.equals(attributeInfo.getName()) || !keySet.contains(attributeInfo.getName())) { continue; } Object v = source.get(attributeInfo.getName()); builder.put(attributeInfo.getName(), attributeInfo.build(v, cryptoService)); } } return new Pair<ObjectClass, Set<Attribute>>(objectClass, new HashSet<Attribute>(builder.values())); } ObjectClassInfoHelper(Map<String, Object> schema); ObjectClass getObjectClass(); Set<String> getAttributesReturnedByDefault(); Pair<ObjectClass, Set<Attribute>> build(Class<? extends APIOperation> operation, JsonValue source, CryptoService cryptoService); JsonValue build(ConnectorObject source, CryptoService cryptoService); Attribute build(String attributeName, Object source, CryptoService cryptoService);  }### Answer:
@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")); }