@Before
  public void setup() throws Exception {
    task = new RangerDumpTask(mockClient, conf, work);
    when(mockClient.removeMultiResourcePolicies(Mockito.anyList())).thenCallRealMethod();
    when(mockClient.checkConnection(Mockito.anyString(), Mockito.any())).thenReturn(true);
    when(work.getMetricCollector()).thenReturn(metricCollector);
  }
Unit test class for testing Ranger Dump.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerDumpTask.java