@Test
  public void testFailureInvalidRangerConfig() throws Exception {
    when(work.getDbName()).thenReturn("testdb");
    when(work.getCurrentDumpPath()).thenReturn(new Path("/tmp"));
    int status = task.execute();
    Assert.assertEquals(ErrorMsg.REPL_INVALID_CONFIG_FOR_SERVICE.getErrorCode(), status);
  }
Unit test class for testing Ranger Dump.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerDumpTask.java