/** * @expectedException Application\Exceptions\NotFoundException */ public function testUpdateNonExistingUser() { $this->user->setId('NoExistsId'); $this->userMapper->update($this->user); }