public function assetsCanBePersisted()
{
$resource = $this->resourceManager->importResource(__DIR__ . '/../../Fixtures/Resources/license.txt');
$asset = new Asset($resource);
$this->assetRepository->add($asset);
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
$this->assertCount(1, $this->assetRepository->findAll());
$this->assertInstanceOf(Asset::class, $this->assetRepository->findAll()->getFirst());
// This is necessary to initialize all resource instances before the tables are deleted
foreach ($this->assetRepository->findAll() as $asset) {
$asset->getResource()->getSha1();
}
}