public function testProcess14H1_Riptide_Royalty_Data_Selected()
 {
     $this->resetEvents();
     $fileName = "test_royalty_payment_file_large.csv";
     $path = $this->copyFileToTemp($fileName);
     $s = $this->service();
     $companyId = rand(1000, 1000000);
     $rpf = $s->process($path, $companyId, ["year" => 2015, "month" => 7]);
     $this->assertTrue($rpf->status == RoyaltyPaymentFile::STATUS_PAYMENTS_PROCESSED);
     $payments = RoyaltyPayment::all();
     $this->assertTrue(count($payments) == 5434);
     $payees = User::all();
     $this->assertTrue(count($payees) == 41);
     $rpf = RoyaltyPaymentFile::where("company_id", "=", $companyId)->first();
     $this->assertTrue($rpf->company_id == $companyId);
     $this->assertTrue($rpf->id == 1);
     $this->assertTrue($rpf->path == $path);
     $this->assertTrue($rpf->name == $fileName);
     $this->assertTrue($rpf->status == RoyaltyPaymentFile::STATUS_PAYMENTS_PROCESSED);
     $this->resetEvents();
 }
 public static function paymentProcessed()
 {
     return RoyaltyPaymentFile::where("status", "=", self::STATUS_PAYMENTS_PROCESSED);
 }