@Test
  public void testRangerClientTimeouts() {
    Mockito.when(conf.getTimeVar(HiveConf.ConfVars.REPL_EXTERNAL_CLIENT_CONNECT_TIMEOUT,
            TimeUnit.MILLISECONDS)).thenReturn(20L);
    Mockito.when(conf.getTimeVar(HiveConf.ConfVars.REPL_RANGER_CLIENT_READ_TIMEOUT,
            TimeUnit.MILLISECONDS)).thenReturn(500L);
    Mockito.when(mockClient.getRangerClient(Mockito.any(HiveConf.class))).thenCallRealMethod();
    Client client =mockClient.getRangerClient(conf);
    Assert.assertEquals(20, client.getProperties().get(ClientConfig.PROPERTY_CONNECT_TIMEOUT));
    Assert.assertEquals(500, client.getProperties().get(ClientConfig.PROPERTY_READ_TIMEOUT));
  }
Unit test class for testing Ranger Dump.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/ranger/TestRangerRestClient.java