public function testCreateSubjectFromMetadata()
{
$metadata = $this->prophesize(SubjectMetadata::class);
$metadata->getName()->willReturn('hello');
$metadata->getGroups()->willReturn(['one', 'two']);
$metadata->getSleep()->willReturn(30);
$metadata->getRetryThreshold()->willReturn(10);
$metadata->getOutputTimeUnit()->willReturn(50);
$metadata->getOutputMode()->willReturn(60);
$metadata->getOutputTimePrecision()->willReturn(3);
$subject = $this->benchmark->createSubjectFromMetadata($metadata->reveal());
$this->assertInstanceOf('PhpBench\\Model\\Subject', $subject);
$this->assertEquals('hello', $subject->getName());
$this->assertEquals(['one', 'two'], $subject->getGroups());
$this->assertEquals(30, $subject->getSleep());
$this->assertEquals(10, $subject->getRetryThreshold());
$this->assertEquals(50, $subject->getOutputTimeUnit());
$this->assertEquals(60, $subject->getOutputMode());
$this->assertEquals(3, $subject->getOutputTimePrecision());
$subjects = $this->benchmark->getSubjects();
$this->assertCount(1, $subjects);
$bSubject = current($subjects);
$this->assertInstanceOf('PhpBench\\Model\\Subject', $bSubject);
$this->assertSame($subject, $bSubject);
}