//when(ts.getCredits()).thenReturn(new Credits("normalToken", "tSec", "x", "y"));
when(ts.getTwitterUser()).thenReturn(new Twitter4JUser("testuser"));
WebResponse resp = mock(WebResponse.class);
JUser user = new JUser("testuser");
ElasticUserSearch uSearch = newMockUserSearch(user);
MySession session = (MySession) tester.getWicketSession();
session.setTwitterSearch(ts);
session.setFormData("tmp@tmp.de", "test");
// token starts with user id!
Cookie cookie = session.afterLogin(new AccessToken("123-normalToken", "tSec"), uSearch, resp);