tester.getApplication().getComponentInstantiationListeners()
.add(new PaxWicketSpringBeanComponentInjector(tester.getApplication(), context));
mockShiroSession = mock(Session.class);
mockSubject = mock(Subject.class);
when(mockSubject.getSession()).thenReturn(mockShiroSession);
threadState = new SubjectThreadState(mockSubject);
threadState.bind();
final AtomicReference<Object> authenticated = new AtomicReference<Object>();
Mockito.doAnswer(new Answer<Void>() {