@Override
  public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
    return (entryName.equals(name)) ? entry : ((baseConfig != null)
        ? baseConfig.getAppConfigurationEntry(name) : null);
  }
@Test
  public void test() throws Exception {
    String krb5LoginModuleName;
    if (System.getProperty("java.vendor").contains("IBM")) {
      krb5LoginModuleName = "com.ibm.security.auth.module.Krb5LoginModule";
    } else {
      krb5LoginModuleName = "com.sun.security.auth.module.Krb5LoginModule";
    }

    JaasConfiguration jConf =
            new JaasConfiguration("foo", "foo/localhost",
            "/some/location/foo.keytab");
    AppConfigurationEntry[] entries = jConf.getAppConfigurationEntry("bar");
    Assert.assertNull(entries);
    entries = jConf.getAppConfigurationEntry("foo");
    Assert.assertEquals(1, entries.length);
    AppConfigurationEntry entry = entries[0];
    Assert.assertEquals(AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
            entry.getControlFlag());
    Assert.assertEquals(krb5LoginModuleName, entry.getLoginModuleName());
    Map<String, ?> options = entry.getOptions();
    Assert.assertEquals("/some/location/foo.keytab", options.get("keyTab"));
    Assert.assertEquals("foo/localhost", options.get("principal"));
    Assert.assertEquals("true", options.get("useKeyTab"));
    Assert.assertEquals("true", options.get("storeKey"));
    Assert.assertEquals("false", options.get("useTicketCache"));
    Assert.assertEquals("true", options.get("refreshKrb5Config"));
    Assert.assertEquals(6, options.size());
  }