ctx.setPath("/");
ctx.setName("SimpleContext");
ctx.setRealm(Mockito.mock(SimpleRealm.class, Mockito.CALLS_REAL_METHODS));
final SimpleEngine engine = Mockito.mock(SimpleEngine.class, Mockito.CALLS_REAL_METHODS);
ctx.setParent(engine);
final SimplePipeline pipeline = Mockito.mock(SimplePipeline.class, Mockito.CALLS_REAL_METHODS);
pipeline.setValves(new Valve[0]);
engine.setPipeline(pipeline);
ctx.setPipeline(pipeline);
ctx.setAuthenticator(this.authenticator);
this.authenticator.setContainer(ctx);
this.authenticator.start();