@Test public void testGetPrincipal_TargetHasPrincipal() { when(authenticationSourceMock.getPrincipal()).thenReturn("cn=someUser"); String principal = tested.getPrincipal(); assertThat(principal).isEqualTo("cn=someUser"); }
public String getPrincipal() { String principal = target.getPrincipal(); if (StringUtils.hasText(principal)) { return principal; } else { return defaultUser; } }
DefaultValuesAuthenticationSourceDecorator implements
        AuthenticationSource, InitializingBean { public String getPrincipal() { String principal = target.getPrincipal(); if (StringUtils.hasText(principal)) { return principal; } else { return defaultUser; } } }
DefaultValuesAuthenticationSourceDecorator implements
        AuthenticationSource, InitializingBean { public String getPrincipal() { String principal = target.getPrincipal(); if (StringUtils.hasText(principal)) { return principal; } else { return defaultUser; } } DefaultValuesAuthenticationSourceDecorator();  DefaultValuesAuthenticationSourceDecorator(
            AuthenticationSource target, String defaultUser,
            String defaultPassword); }
DefaultValuesAuthenticationSourceDecorator implements
        AuthenticationSource, InitializingBean { public String getPrincipal() { String principal = target.getPrincipal(); if (StringUtils.hasText(principal)) { return principal; } else { return defaultUser; } } DefaultValuesAuthenticationSourceDecorator();  DefaultValuesAuthenticationSourceDecorator(
            AuthenticationSource target, String defaultUser,
            String defaultPassword); String getCredentials(); String getPrincipal(); void setDefaultPassword(String defaultPassword); void setDefaultUser(String defaultUser); void setTarget(AuthenticationSource target); void afterPropertiesSet(); }
DefaultValuesAuthenticationSourceDecorator implements
        AuthenticationSource, InitializingBean { public String getPrincipal() { String principal = target.getPrincipal(); if (StringUtils.hasText(principal)) { return principal; } else { return defaultUser; } } DefaultValuesAuthenticationSourceDecorator();  DefaultValuesAuthenticationSourceDecorator(
            AuthenticationSource target, String defaultUser,
            String defaultPassword); String getCredentials(); String getPrincipal(); void setDefaultPassword(String defaultPassword); void setDefaultUser(String defaultUser); void setTarget(AuthenticationSource target); void afterPropertiesSet();  }