return new Authentication(user, credentials.toString());
}
throw new AuthenticationException("username and password did not match");
}
});
PrivateKeySource keySource = mock(PrivateKeySource.class);
when(keySource.getPrivateKey()).thenReturn(privateKey);
MessageCryptoFilterFactory cipherFactory = new MessageCryptoFilterFactory(keySource, "AES");
FilterChainFactory<String, String> factory = new FilterChainFactory<String, String>(String.class, String.class);
factory.setFilters(Arrays.asList(
EncryptedJsonMessageMarshaller.class,
cipherFactory,