@Test
  public void testFailureInvalidAuthProviderEndpoint() {
    when(work.getCurrentDumpPath()).thenReturn(new Path("dumppath"));
    int status = task.execute();
    Assert.assertEquals(ErrorMsg.REPL_INVALID_CONFIG_FOR_SERVICE.getErrorCode(), status);
  }
Unit test class for testing Ranger Load.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerLoadTask.java