@Test
  public void testConstructor() throws NoSuchMethodException {
    AmbariKerberosAuthenticationProperties properties = createMock(AmbariKerberosAuthenticationProperties.class);
    expect(properties.isKerberosAuthenticationEnabled()).andReturn(true).once();
    expect(properties.getSpnegoPrincipalName()).andReturn("HTTP/somehost.example.com").times(1);
    expect(properties.getSpnegoKeytabFilePath()).andReturn("/etc/security/keytabs/spnego.service.keytab").times(2);

    Configuration configuration = createMock(Configuration.class);
    expect(configuration.getKerberosAuthenticationProperties()).andReturn(properties).once();

    replayAll();

    new AmbariKerberosTicketValidator(configuration);

    verifyAll();
  }
Tests an {@link AmbariKerberosTicketValidator} to ensure that the Spnego identity is properly
set in the base class during construction.
ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java