public function shouldThrowExceptionWhenFileAlreadyExists()
{
//given
$generator = new Generator('products');
$fileName = '/tmp/example.php';
file_put_contents($fileName, '');
//when
CatchException::when($generator)->saveToFile($fileName);
//then
CatchException::assertThat()->isInstanceOf('\\Ouzo\\Tools\\Model\\Template\\GeneratorException');
unlink($fileName);
}