diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapper.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapper.java index 5b72c2b3c11c5e..334faf753cb8b5 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapper.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapper.java @@ -77,9 +77,6 @@ public class EntityTypeUrnMapper { .put( Constants.BUSINESS_ATTRIBUTE_ENTITY_NAME, "urn:li:entityType:datahub.businessAttribute") - .put( - Constants.DATA_PROCESS_INSTANCE_ENTITY_NAME, - "urn:li:entityType:datahub.dataProcessInstance") .build(); private static final Map ENTITY_TYPE_URN_TO_NAME = diff --git a/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeMapperTest.java b/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeMapperTest.java new file mode 100644 index 00000000000000..79cc7725b1fc7f --- /dev/null +++ b/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeMapperTest.java @@ -0,0 +1,20 @@ +package com.linkedin.datahub.graphql.types.entitytype; + +import static org.testng.Assert.*; + +import com.linkedin.datahub.graphql.generated.EntityType; +import com.linkedin.metadata.Constants; +import org.testng.annotations.Test; + +public class EntityTypeMapperTest { + + @Test + public void testGetType() throws Exception { + assertEquals(EntityTypeMapper.getType(Constants.DATASET_ENTITY_NAME), EntityType.DATASET); + } + + @Test + public void testGetName() throws Exception { + assertEquals(EntityTypeMapper.getName(EntityType.DATASET), Constants.DATASET_ENTITY_NAME); + } +} diff --git a/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapperTest.java b/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapperTest.java new file mode 100644 index 00000000000000..ed16226d0685ee --- /dev/null +++ b/datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeUrnMapperTest.java @@ -0,0 +1,30 @@ +package com.linkedin.datahub.graphql.types.entitytype; + +import static org.testng.Assert.*; + +import com.linkedin.datahub.graphql.generated.EntityType; +import com.linkedin.metadata.Constants; +import org.testng.annotations.Test; + +public class EntityTypeUrnMapperTest { + + @Test + public void testGetName() throws Exception { + assertEquals( + EntityTypeUrnMapper.getName("urn:li:entityType:datahub.dataset"), + Constants.DATASET_ENTITY_NAME); + } + + @Test + public void testGetEntityType() throws Exception { + assertEquals( + EntityTypeUrnMapper.getEntityType("urn:li:entityType:datahub.dataset"), EntityType.DATASET); + } + + @Test + public void testGetEntityTypeUrn() throws Exception { + assertEquals( + EntityTypeUrnMapper.getEntityTypeUrn(Constants.DATASET_ENTITY_NAME), + "urn:li:entityType:datahub.dataset"); + } +}