@Test
public void getJaasConfigForClientPrincipal() {

    Map<String, String> conf = new HashMap();
    assertNull(SecurityUtils.getJaasConfigForClientPrincipal(conf));
    conf.put(RANGER_LOOKUP_KEYTAB, "/tmp/rangerlookup.keytab");
    assertNull(SecurityUtils.getJaasConfigForClientPrincipal(conf));
    conf.put(RANGER_LOOKUP_PRINCIPAL, "rangerlookup");
    String expected = "com.sun.security.auth.module.Krb5LoginModule" +
            " required useTicketCache=false principal=\"rangerlookup\" " +
            "useKeyTab=true keyTab=\"/tmp/rangerlookup.keytab\";";
    String actual = SecurityUtils.getJaasConfigForClientPrincipal(conf);
    assertEquals(actual, expected);
}