{
ProjectForgeApp.init(null, null);
WicketApplication.internalSetUpAndRunning(true);
final HttpServletResponse response = mock(HttpServletResponse.class);
final UserDao userDao = mock(UserDao.class);
when(userDao.authenticateUser(Mockito.eq("successUser"), Mockito.eq("successPassword"))).thenReturn(
new PFUserDO().setUsername("successUser"));
when(userDao.getCachedAuthenticationToken(Mockito.eq(2))).thenReturn("token");
final UserGroupCache userGroupCache = mock(UserGroupCache.class);
when(userDao.getUserGroupCache()).thenReturn(userGroupCache);
when(userGroupCache.getUser(Mockito.eq(2))).thenReturn(new PFUserDO().setUsername("testuser"));