}
@Before
public void setupInfrastructure() throws Exception {
System.setProperty("karaf.home", dataFolder.getRoot().getAbsolutePath());
FileKeySource fileKeySource = new FileKeySource("etc/keys", "RSA");
fileKeySource.init();
serverPublicKey = fileKeySource.getPublicKey();
privateKeySource = fileKeySource;
requestHandler = mock(RequestHandler.class);
authManager = mock(AuthenticationDomain.class);
when(authManager.authenticate(anyString(), any(Credentials.class))).thenAnswer(new Answer<Authentication>() {
@Override