private void doRender(boolean authenticated, boolean isAdmin)
{
when(this.mockSubject.isAuthenticated()).thenReturn(authenticated);
if(!isAdmin)
{
doThrow(new AuthorizationException()).when(this.mockSubject).checkRole("admin");
}
this.tester.startPage(AdministrationPage.class);
}