use of nl.knaw.huygens.timbuctoo.security.exceptions.LocalLoginUnavailableException in project timbuctoo by HuygensING.
the class LoggedInUsersTest method throwsLocalLoginUnavailableExceptionWhenTheUserCouldNotBeAuthenticatedLocallyDueToASystemError.
@Test
public void throwsLocalLoginUnavailableExceptionWhenTheUserCouldNotBeAuthenticatedLocallyDueToASystemError() throws Exception {
Authenticator authenticator = mock(JsonBasedAuthenticator.class);
given(authenticator.authenticate(anyString(), anyString())).willThrow(new LocalLoginUnavailableException(""));
LoggedInUsers instance = new LoggedInUsers(authenticator, null, ONE_SECOND_TIMEOUT, null);
expectedException.expect(LocalLoginUnavailableException.class);
instance.userTokenFor("", "");
}
Aggregations