/**
  * @param array  $lists
  * @param string $listName
  * @param $boardName
  *
  * @throws \Exception
  */
 private function addList(array &$lists, string $listName, $boardName)
 {
     if ($boardName !== null) {
         $board = $this->boardManager->getBoard($boardName);
         if ($board == null || !$board instanceof Board) {
             throw new TrelloItemNotFoundException('board', $boardName);
         }
         $list = $this->listManager->getListFromBoard($listName, $board);
         if ($list == null || !$list instanceof Cardlist) {
             throw new TrelloItemNotFoundException('list', $listName);
         }
         $lists[] = $list;
     } else {
         $list = $this->listManager->getList($listName, $this->boards);
         if ($list == null || !$list instanceof Cardlist) {
             throw new TrelloItemNotFoundException('list', $listName);
         }
         $lists[] = $list;
     }
 }
 /**
  * Test exception when board cannot be find.
  */
 public function testGetBoardWithWrongName()
 {
     $trelloClient = $this->getTrelloClientMock();
     $boardManager = new BoardManager($trelloClient);
     $this->assertNull($boardManager->getBoard('test 3'));
 }