Commit d52369ef by Madhan Neethiraj

ATLAS-3067: updated EntityJerseyResourceIT.testUTF8() to aid troubleshooting failures - #2

parent 36459c78
......@@ -833,13 +833,14 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
Collections.singletonList(classTypeDefinition));
createType(typesDef);
Referenceable instance = new Referenceable(classType);
instance.set(attrName, attrValue);
Id guid = createInstance(instance);
ObjectNode response = atlasClientV1.callAPIWithBodyAndParams(AtlasClient.API_V1.GET_ENTITY, null, guid._getId());
Referenceable getReferenceable = AtlasType.fromV1Json(AtlasType.toJson(response.get(AtlasClient.DEFINITION)), Referenceable.class);
Assert.assertEquals(getReferenceable.get(attrName), attrValue);
Referenceable instance = new Referenceable(classType, Collections.singletonMap(attrName, attrValue));
Id guid = createInstance(instance);
ObjectNode response = atlasClientV1.callAPIWithBodyAndParams(AtlasClient.API_V1.GET_ENTITY, null, guid._getId());
Object objResponse = response.get(AtlasClient.DEFINITION);
String jsonResponse = AtlasType.toJson(objResponse);
Referenceable createdEntity = AtlasType.fromV1Json(jsonResponse, Referenceable.class);
Assert.assertEquals(createdEntity.get(attrName), attrValue, "entityId=" + guid + "; objResponse=" + objResponse + "; jsonResponse=" + jsonResponse + "; createdEntity=" + createdEntity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment