private function setMockUserSession(MockObject $mockUser)
{
$mockUserSession = $this->getMock('Craft\\UserSessionService');
$this->setComponent(craft(), 'userSession', $mockUserSession);
$mockUserSession->expects($this->exactly(1))->method('getUser')->willReturn($mockUser);
}