@Test
  public void testRangerEndpointCreation() throws Exception {
    RangerRestClientImpl rangerRestClient = new RangerRestClientImpl();
    Assert.assertTrue(rangerRestClient.getRangerExportUrl("http://ranger.apache.org:6080",
      "hive", "dbname").equals("http://ranger.apache.org:6080/service/plugins/"
      + "policies/exportJson?serviceName=hive&polResource=dbname&resource%3Adatabase=dbname&serviceType=hive"
      + "&resourceMatchScope=self_or_ancestor&resourceMatch=full"));

    Assert.assertTrue(rangerRestClient.getRangerExportUrl("http://ranger.apache.org:6080/",
      "hive", "dbname").equals("http://ranger.apache.org:6080/service/plugins/"
      + "policies/exportJson?serviceName=hive&polResource=dbname&resource%3Adatabase=dbname&serviceType=hive"
      + "&resourceMatchScope=self_or_ancestor&resourceMatch=full"));

    Assert.assertTrue(rangerRestClient.getRangerImportUrl("http://ranger.apache.org:6080/",
      "dbname").equals("http://ranger.apache.org:6080/service/plugins/policies/importPoliciesFromFile"
      + "?updateIfExists=true&polResource=dbname&policyMatchingAlgorithm=matchByName"));

    Assert.assertTrue(rangerRestClient.getRangerImportUrl("http://ranger.apache.org:6080",
      "dbname").equals("http://ranger.apache.org:6080/service/plugins/policies/importPoliciesFromFile"
      + "?updateIfExists=true&polResource=dbname&policyMatchingAlgorithm=matchByName"));

  }
Unit test class for testing Ranger Load.
ql/src/test/org/apache/hadoop/hive/ql/exec/repl/TestRangerLoadTask.java