private void assertNotEqualsRangerPolicies(List<RangerPolicy> expectedRangerPolicies,
                                          List<RangerPolicy> actualRangerPolicies, String targetName) {
    Assert.assertEquals(expectedRangerPolicies.size(), actualRangerPolicies.size());
    for (int index = 0; index < expectedRangerPolicies.size(); index++) {
      Assert.assertEquals(expectedRangerPolicies.get(index).getName(), actualRangerPolicies.get(index).getName());
      Assert.assertEquals(expectedRangerPolicies.get(index).getService(), actualRangerPolicies.get(index).getService());
      Assert.assertEquals(expectedRangerPolicies.get(index).getDescription(),
        actualRangerPolicies.get(index).getDescription());
      Assert.assertEquals(expectedRangerPolicies.get(index).getPolicyType(),
        actualRangerPolicies.get(index).getPolicyType());
      Assert.assertEquals(expectedRangerPolicies.get(index).getResources().size(),
        actualRangerPolicies.get(index).getResources().size());
      Assert.assertEquals(expectedRangerPolicies.get(index).getResources().size(),
        actualRangerPolicies.get(index).getResources().size());
      RangerPolicy.RangerPolicyResource expectedRangerPolicyResource = expectedRangerPolicies.get(index)
        .getResources().get("database");
      RangerPolicy.RangerPolicyResource actualRangerPolicyResource = actualRangerPolicies.get(index)
        .getResources().get("database");
      Assert.assertEquals(expectedRangerPolicyResource.getValues().size(),
        actualRangerPolicyResource.getValues().size());
      for (int resourceIndex = 0; resourceIndex < expectedRangerPolicyResource.getValues().size(); resourceIndex++) {
        Assert.assertEquals(actualRangerPolicyResource.getValues().get(index),
          targetName);
      }
    }
  }
Unit test class for testing Ranger Load.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerLoadTask.java