$this->
getContainer()->
get(DefinitionInstanceRegistry::
class),
$this->
getContainer()->
get(SerializerRegistry::
class),
null,
null,
$this->
getContainer()->
get(PrimaryKeyResolver::
class) );
$sourceEntity = ProductDefinition::ENTITY_NAME;
$config =
new Config([],
['sourceEntity' =>
$sourceEntity],
[]);
$id = Uuid::
randomHex();
$product =
(new ProductEntity())->
assign([ 'id' =>
$id,
'stock' => 101,
'productNumber' => 'P101',
'active' => true,
'translations' =>
new ProductTranslationCollection([ (new ProductTranslationEntity())->
assign([ 'languageId' => Defaults::LANGUAGE_SYSTEM,
'name' => 'test product',
'_uniqueIdentifier' =>
$id . '_' . Defaults::LANGUAGE_SYSTEM,
]),
]),
]);