public AtlasServiceException getAtlasServiceException(ClientResponse.Status status) {
    AtlasBaseClient.API api = new AtlasBaseClient.API("/api/atlas/admin", HttpMethod.POST,
            Response.Status.fromStatusCode(status.getStatusCode()));
    ClientResponse response = Mockito.mock(ClientResponse.class);
    when(response.getStatus()).thenReturn(status.getStatusCode());
    AtlasServiceException atlasServiceException = new AtlasServiceException(api, response);
    return atlasServiceException;
  }
Unit test class for testing Atlas metadata Dump.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestAtlasDumpTask.java