public function import()
 {
     $imap = new Server($this->server, $this->port);
     $imap->setAuthentication($this->username, $this->password);
     $imap->setMailBox($this->mailbox);
     $dataProvider = new DataProvider();
     $purchaseService = new PurchaseService($dataProvider);
     $user_service = new UserService($dataProvider, new Client());
     $user = $user_service->getById($this->backend_users_id);
     $importer = new ImporterService();
     $importer->addImporter(new MailItauCardImport($imap, $purchaseService));
     $importer->addImporter(new MailItauDebitImport($imap, $purchaseService));
     $importer->addImporter(new MailItauWithdrawImport($imap, $purchaseService));
     $importer->addImporter(new MailItauUniclassDebitImport($imap, $purchaseService));
     if ($this->is_first_time) {
         $importer->import(null, $user);
         $this->is_first_time = false;
         $this->save();
     } else {
         $importer->import(10, $user);
     }
 }
 public function testGetById_Invalid()
 {
     $user = $this->createUser();
     $this->user_service->save($user);
     $this->assertNull($this->user_service->getById(69));
 }