/**
  * @param int $id
  * @param int $box
  * @return int
  */
 public function deleteMessage($id, $box)
 {
     return $this->repository->delete($id, $box)->rowCount();
 }
 /**
  * @param int $recipientId
  *
  * @return int
  */
 public function countUnreadMessages($recipientId)
 {
     return $this->repository->countUnreadMessages($recipientId);
 }
 public function testCountUnreadMessages()
 {
     $this->assertEquals(1, $this->repository->countUnreadMessages(2));
 }