@Test
  public void testSuccessValidAuthProviderEndpoint() throws MalformedURLException {
    when(conf.get(RANGER_REST_URL)).thenReturn("rangerEndpoint");
    when(work.getSourceDbName()).thenReturn("srcdb");
    when(work.getTargetDbName()).thenReturn("tgtdb");
    when(work.getRangerConfigResource()).thenReturn(new URL("file://ranger.xml"));
    int status = task.execute();
    Assert.assertEquals(0, status);
  }
Unit test class for testing Ranger Load.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerLoadTask.java