/**
  * @test
  */
 public function sets_the_parent_reference_on_the_new_object()
 {
     $referenceFoundInSession = new ReferencingApplication();
     // Set up the necessary scenarios for finding a valid reference in the session...
     $this->mockSessionHolder->expects($this->once())->method('getReferenceFromSession')->willReturn($referenceFoundInSession);
     // And for getting its corresponding ReferencingDecisionDetails object...
     $this->mockDecisionDetailsRetriever->method('getDecisionDetails')->with($referenceFoundInSession)->willReturn(new ReferencingDecisionDetails());
     // And then we can assert that 'setParent' will be called on the RentRecoveryPlusReference object.
     $this->mockRentRecoveryPlusReference->expects($this->once())->method('setParent')->will($this->returnSelf());
     // Trigger the test
     $transformer = new ReferenceNumberToReferenceObjectTransformer($this->mockDecisionDetailsRetriever, $this->mockSessionHolder, $this->mockRentRecoveryPlusReference);
     $transformer->reverseTransform('HLT999');
 }