@Test
public void testGetPrincipalNoOverride() throws Exception {

  // Given
  Principal origPrincipal = new Principal() {
    @Override
    public String getName() {
      return "user";
    }
  };
  Authentication authentication = new TestingAuthenticationToken(origPrincipal, "password");
  Authentication ambariAuthentication = new AmbariAuthentication(authentication, DEFAULT_USER_ID);
  // When
  Object principal = ambariAuthentication.getPrincipal();
  // Then
  assertSame(origPrincipal, principal);
}