public function generateTestsForModel($packageKey, $modelName, $overwrite = false)
{
list($baseNamespace) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey));
$testName = ucfirst($modelName) . 'Test';
$namespace = trim($baseNamespace, '\\') . '\\Tests\\Unit\\Domain\\Model';
$templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Tests/Unit/Model/EntityTestTemplate.php.tmpl';
$contextVariables = array();
$contextVariables['packageKey'] = $packageKey;
$contextVariables['testName'] = $testName;
$contextVariables['modelName'] = $modelName;
$contextVariables['namespace'] = $namespace;
$fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);
$testFilename = $testName . '.php';
$testPath = $this->packageManager->getPackage($packageKey)->getPackagePath() . PackageInterface::DIRECTORY_TESTS_UNIT . 'Domain/Model/';
$targetPathAndFilename = $testPath . $testFilename;
$this->generateFile($targetPathAndFilename, $fileContent, $overwrite);
return $this->generatedFiles;
}