/**
  * @return array
  */
 public function invalidDataProvider()
 {
     $endpoint = new Endpoint(Binding::httpPost(), 'some:uri', 'some:response:location');
     return array('no matching keys' => array(array('ep' => $endpoint->serialize(), 'foo' => 1, 'bar' => false)), 'no endpoint' => array(array('index' => 1, 'is_default' => true)), 'no index' => array(array('endpoint' => $endpoint->serialize(), 'is_default' => false)), 'no is_default' => array(array('endpoint' => $endpoint->serialize(), 'index' => 2)));
 }
 public function serialize()
 {
     return array('endpoint' => $this->endpoint->serialize(), 'index' => $this->index, 'is_default' => $this->isDefault);
 }
 /**
  * @test
  * @group metadata
  * @group common
  *
  * @dataProvider invalidDataProvider
  * @expectedException InvalidArgumentException
  *
  * @param array $invalidData
  */
 public function deserialization_requires_presence_of_all_required_keys($invalidData)
 {
     Endpoint::deserialize($invalidData);
 }