@Test
public void testGetPrincipal_TargetHasPrincipal() {

    when(authenticationSourceMock.getPrincipal()).thenReturn("cn=someUser");
    String principal = tested.getPrincipal();
    assertThat(principal).isEqualTo("cn=someUser");
}