appctx.putBean(wicketConfiguration);
appctx.putBean(mock(PagePreprocessorsRegistry.class));
appctx.putBean(mock(BreadcrumbInfoAccessor.class));
appctx.putBean(mock(BreadcrumbsStore.class));
MessageReader messageReader = mock(MessageReader.class);
when(messageReader.getUserMessages(Mockito.<Integer>any(), Mockito.<SortDescriptor>any())).thenReturn(new EmptyDataSet<Message>(Message.class));
appctx.putBean(messageReader);
appctx.putBean(mock(MessageWriter.class));
appctx.putBean(mock(RepresentationFactory.class));