public function testPositiveLicenses()
 {
     $addedLic = M::mock(LicenseRef::classname());
     $addedClearingLic = M::mock(ClearingLicense::classname());
     $addedClearingLic->shouldReceive('isRemoved')->withNoArgs()->andReturn(false);
     $addedClearingLic->shouldReceive('getLicenseRef')->withNoArgs()->andReturn($addedLic);
     $removedClearingLic = M::mock(ClearingLicense::classname());
     $removedClearingLic->shouldReceive('isRemoved')->andReturn(true);
     $removedClearingEvent = M::mock(ClearingEvent::classname());
     $this->clearingEvent->shouldReceive('getClearingLicense')->andReturn($addedClearingLic);
     $removedClearingEvent->shouldReceive('getClearingLicense')->andReturn($removedClearingLic);
     $clearingDec = $this->clearingDecisionBuilder->setClearingEvents(array($this->clearingEvent, $removedClearingEvent))->build();
     assertThat($clearingDec->getPositiveLicenses(), is(arrayContaining($addedLic)));
 }