@Test
  public void testCreateExportRequest() throws Exception {
    List<String> listOfTable = Arrays.asList(new String [] {"t1", "t2"});
    AtlasRequestBuilder atlasRequestBuilder = Mockito.spy(AtlasRequestBuilder.class);
    Mockito.doReturn(listOfTable).when(atlasRequestBuilder)
            .getFileAsList(any(Path.class), any(HiveConf.class));
    AtlasReplInfo atlasReplInfo = new AtlasReplInfo("http://localhost:31000", "srcDb", "tgtDb",
            "src","tgt", new Path("/tmp/staging"), new Path("/tmp/list"), conf);
    AtlasExportRequest atlasExportRequest = atlasRequestBuilder.createExportRequest(atlasReplInfo);
    List<AtlasObjectId> itemsToExport = atlasExportRequest.getItemsToExport();
    Assert.assertEquals(2, itemsToExport.size());
    Assert.assertEquals(AtlasRequestBuilder.ATLAS_TYPE_HIVE_TABLE, itemsToExport.get(0).getTypeName());
    Assert.assertEquals("srcdb.t1@src", itemsToExport.get(0).getUniqueAttributes().get(
            AtlasRequestBuilder.ATTRIBUTE_QUALIFIED_NAME));
    Assert.assertEquals(AtlasRequestBuilder.ATLAS_TYPE_HIVE_TABLE, itemsToExport.get(1).getTypeName());
    Assert.assertEquals("srcdb.t2@src", itemsToExport.get(1).getUniqueAttributes().get(
            AtlasRequestBuilder.ATTRIBUTE_QUALIFIED_NAME));
  }
Unit test class for testing Atlas metadata Dump.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestAtlasDumpTask.java