@Test
  public void testKerberosAuthenticationDisabledWithValuesSet() {
    Properties properties = new Properties();
    properties.put(Configuration.KERBEROS_AUTH_ENABLED.getKey(), "false");
    properties.put(Configuration.KERBEROS_AUTH_SPNEGO_KEYTAB_FILE.getKey(), "/path/to/spnego/keytab/file");
    properties.put(Configuration.KERBEROS_AUTH_SPNEGO_PRINCIPAL.getKey(), "spnego/principal@REALM");
    properties.put(Configuration.KERBEROS_AUTH_AUTH_TO_LOCAL_RULES.getKey(), "DEFAULT");

    Configuration configuration = new Configuration(properties);

    AmbariKerberosAuthenticationProperties kerberosAuthenticationProperties = configuration.getKerberosAuthenticationProperties();

    Assert.assertFalse(kerberosAuthenticationProperties.isKerberosAuthenticationEnabled());
    Assert.assertNull(kerberosAuthenticationProperties.getSpnegoKeytabFilePath());
    Assert.assertNull(kerberosAuthenticationProperties.getSpnegoPrincipalName());
    Assert.assertNull(kerberosAuthenticationProperties.getAuthToLocalRules());
  }
Tests that the Kerberos-authentication properties are read and properly set in an
{@link AmbariKerberosAuthenticationProperties} instance when Kerberos authentication is disabled.
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java