/**
  * @param array $data
  *
  * @throws \Exception
  *
  * @return GithubMilestoneSource
  */
 protected function convertMilestone(array $data)
 {
     $milestone = new GithubMilestoneSource(new GithubMilestoneId($data['id']), $this->githubRepo, $data['number'], GithubMilestoneStateFactory::create($data['state']), $data['title'], $data['description'], $this->getUserIfExists($data['creator']), $data['open_issues'], $data['closed_issues'], $this->getDateIfExists($data['due_on']), new DateTime($data['created_at']), new DateTime($data['updated_at']), $this->getDateIfExists($data['closed_at']));
     return $milestone;
 }
 public function testCreateThrowsExceptionOnUnsupportedValue()
 {
     $this->setExpectedException('\\Exception');
     GithubMilestoneStateFactory::create('unsupported-value');
 }