public function testCreate()
{
$handler = $this->getObjectStateHandler();
$mapperMock = $this->getMapperMock();
$gatewayMock = $this->getGatewayMock();
$mapperMock->expects($this->once())->method('createObjectStateFromInputStruct')->with($this->equalTo($this->getInputStructFixture()))->will($this->returnValue($this->getObjectStateFixture()));
$gatewayMock->expects($this->once())->method('insertObjectState')->with($this->equalTo($this->getObjectStateFixture()), $this->equalTo(2))->will($this->returnValue($this->getObjectStateFixture()));
$result = $handler->create(2, $this->getInputStructFixture());
$this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState', $result);
}