/**
  * @covers \eZ\Publish\Core\Persistence\InMemory\ObjectStateHandler::delete
  */
 public function testDelete()
 {
     $expectedCount = $this->handler->getContentCount(1);
     $this->handler->delete(1);
     try {
         $this->handler->load(1);
         $this->fail('Successfully loaded deleted object state');
     } catch (NotFoundException $e) {
         // Do nothing
     }
     $this->assertEquals(0, $this->handler->getContentCount(1));
     $this->assertEquals($expectedCount, $this->handler->getContentCount(2));
 }
 /**
  * Loads an object state.
  *
  * @param mixed $stateId
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the state was not found
  *
  * @return \eZ\Publish\API\Repository\Values\ObjectState\ObjectState
  */
 public function loadObjectState($stateId)
 {
     $spiObjectState = $this->objectStateHandler->load($stateId);
     return $this->buildDomainObjectStateObject($spiObjectState);
 }