wiringService = defaultWiringService;
}
private void setupSecurityManager() throws AuthenticationException {
AuthenticationDomain authManager = mock(AuthenticationDomain.class);
when(authManager.authenticate(anyString(), any(Credentials.class))).thenAnswer(new Answer<Authentication>() {
@Override
public Authentication answer(InvocationOnMock invocation) throws Throwable {
String username = (String) invocation.getArguments()[0];
Credentials credentials = (Credentials) invocation.getArguments()[1];
return new Authentication(username, credentials);