public function testIssue()
{
$user = new GH71User();
$invoice = new GH71Invoice();
$invoice->user = $user;
$this->dm->persist($user);
$this->dm->persist($invoice);
$this->dm->flush();
$this->dm->clear();
$repository = $this->dm->getRepository(__NAMESPACE__ . '\\GH71Invoice');
$invoices = $repository->findBy(array('user' => $user->id));
$this->assertCount(1, $invoices);
$this->assertEquals($invoice->id, $invoices[0]->id);
}