/**
  * @test
  */
 public function it_compares_dictionaries_without_identifier_by_their_properties()
 {
     $address = AddressDictionary::fromNativeValue(array('street' => 'Main Street', 'streetNumber' => 10, 'zip' => '12345', 'city' => 'Test City'));
     $sameAddress = AddressDictionary::fromNativeValue(array('street' => 'Main Street', 'streetNumber' => 10, 'zip' => '12345', 'city' => 'Test City'));
     $otherAddress = AddressDictionary::fromNativeValue(array('street' => 'Main Street', 'streetNumber' => 10, 'zip' => '12345', 'city' => 'New York'));
     $this->assertTrue($address->sameAs($sameAddress));
     $this->assertFalse($address->sameAs($otherAddress));
 }
 /**
  * @test
  */
 public function it_throws_invalid_type_exception_if_answer_type_does_not_match_with_requested_type()
 {
     $wfMessage = WorkflowMessage::collectDataOf(UserDictionary::prototype(), 'test-case', 'message-handler');
     $address = AddressDictionary::fromNativeValue(array('street' => 'Main Street', 'streetNumber' => 10, 'zip' => '12345', 'city' => 'Test City'));
     $this->setExpectedException('Prooph\\Processing\\Type\\Exception\\InvalidTypeException');
     $wfMessage->answerWith($address);
 }