### Question:
FhirToDhisTransformerContextImpl implements FhirToDhisTransformerContext { @Nullable @Override public Reference createReference( @Nullable String value, @Nonnull Object referenceType ) { return TransformerUtils.createReference( value, referenceType ); } FhirToDhisTransformerContextImpl( @Nonnull FhirRequest fhirRequest, boolean creationDisabled ); @Nonnull @Override FhirRequest getFhirRequest(); @Nullable @Override Reference createReference( @Nullable String value, @Nonnull Object referenceType ); @Nullable @Override String extractDhisId( @Nullable Object idElement ); @Nonnull @Override ZonedDateTime now(); @Override boolean isCreationDisabled(); @Override void fail( @Nonnull String message ); @Nullable @Override String getDhisUsername(); @Nonnull @Override FhirVersion getFhirVersion(); @Override void setAttribute( @Nonnull String name, @Nullable Object value ); @Nullable @Override Object getAttribute( @Nonnull String name );  }### Answer:
@Test public void createReference() { final Reference reference = Objects.requireNonNull( context.createReference( "xYz", "CODE" ) ); Assert.assertEquals( "xYz", reference.getValue() ); Assert.assertEquals( ReferenceType.CODE, reference.getType() ); }
@Test public void createNullReference() { final Reference reference = context.createReference( null, "CODE" ); Assert.assertNull( reference ); }