public void testLoggedIn()
{
IRequestCycle cycle = newCycle();
IEngine engine = newEngine();
IErrorProperty page = newPage();
Visit visit = (Visit) newMock(Visit.class);
trainGetEngine(cycle, engine);
trainGetVisit(engine, visit);
visit.isUserLoggedIn();
setReturnValue(visit, true);
trainGetPage(cycle, "MyLibrary", page);
page.setError("An error.");
cycle.activate(page);
replayControls();