}
private ApplicationImpl mockConfiguration() {
ApplicationImpl application = mock( ApplicationImpl.class );
ApplicationContextImpl context = mock( ApplicationContextImpl.class );
ThemeManager themeManager = mock( ThemeManager.class );
when( context.getThemeManager() ).thenReturn( themeManager );
when( context.getServletContext() ).thenReturn( mock( ServletContext.class ) );
when( application.getApplicationContext() ).thenReturn( context );
ResourceRegistry resourceRegistry = mock( ResourceRegistry.class );
when( context.getResourceRegistry() ).thenReturn( resourceRegistry );