public static AppConfigurationEntry keytabEntry(String keytab, String principal) {

        checkNotNull(keytab, "keytab");
        checkNotNull(principal, "principal");

        Map<String, String> keytabKerberosOptions = new HashMap<>();

        if (IBM_JAVA) {
            keytabKerberosOptions.put("useKeytab", prependFileUri(keytab));
            keytabKerberosOptions.put("credsType", "both");
        } else {
            keytabKerberosOptions.put("keyTab", keytab);
            keytabKerberosOptions.put("doNotPrompt", "true");
            keytabKerberosOptions.put("useKeyTab", "true");
            keytabKerberosOptions.put("storeKey", "true");
        }

        keytabKerberosOptions.put("principal", principal);
        keytabKerberosOptions.put("refreshKrb5Config", "true");
        keytabKerberosOptions.putAll(debugOptions);

        AppConfigurationEntry keytabKerberosAce =
                new AppConfigurationEntry(
                        getKrb5LoginModuleName(),
                        AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
                        keytabKerberosOptions);

        return keytabKerberosAce;
    }
@Test
    public void testKeytabEntry() {
        String keytab = "user.keytab";
        String principal = "user";
        AppConfigurationEntry entry = KerberosUtils.keytabEntry(keytab, principal);
        assertNotNull(entry);
    }