private NegotiateAuthenticator authenticator;
@Before
public void setUp() throws LifecycleException {
this.authenticator = new NegotiateAuthenticator();
final SimpleContext ctx = Mockito.mock(SimpleContext.class, Mockito.CALLS_REAL_METHODS);
ctx.setServletContext(Mockito.mock(SimpleServletContext.class, Mockito.CALLS_REAL_METHODS));
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();
}