public function testDeleteObjectState()
{
$objectStateService = $this->repository->getObjectStateService();
$state = $objectStateService->loadObjectState(1);
$objectStateService->deleteObjectState($state);
try {
$objectStateService->loadObjectState(1);
$this->fail('Successfully loaded object state after deleting it');
} catch (NotFoundException $e) {
// Do nothing
}
$this->assertEquals(0, $objectStateService->getContentCount($state));
$this->assertGreaterThan(0, $objectStateService->getContentCount($objectStateService->loadObjectState(2)));
}