use of org.apache.atlas.TestUtils.randomString in project incubator-atlas by apache.
the class AtlasEntityStoreV1Test method testCreateRequiredAttrNull.
@Test(expectedExceptions = AtlasBaseException.class)
public void testCreateRequiredAttrNull() throws Exception {
//Update required attribute
Map<String, AtlasEntity> tableCloneMap = new HashMap<>();
AtlasEntity tableEntity = new AtlasEntity(TABLE_TYPE);
tableEntity.setAttribute(TestUtilsV2.NAME, "table_" + TestUtils.randomString());
tableCloneMap.put(tableEntity.getGuid(), tableEntity);
entityStore.createOrUpdate(new InMemoryMapEntityStream(tableCloneMap), false);
Assert.fail("Expected exception while creating with required attribute null");
}
Aggregations