use of ddf.security.service.SecurityManager in project ddf by codice.
the class SecurityTest method testGetSubjectInvalidUsernamePassword.
@Test
public void testGetSubjectInvalidUsernamePassword() throws Exception {
SecurityManager sm = mock(SecurityManager.class);
when(sm.getSubject(any())).thenThrow(new SecurityServiceException("Error"));
configureMockForSecurityManager(sm);
Subject subject = security.getSubject("username", "password");
assertThat(subject, is(equalTo(null)));
}
Aggregations