### Question:
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ); @Nullable @Override String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getConstructedText( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getText( @Nullable ICompositeType address );  }### Answer:
@Test public void getSingleLine() { final Address address = new Address().addLine( "Lower Road 20" ).addLine( "Apartment 19" ); Assert.assertEquals( "Lower Road 20 Apartment 19", utils.getSingleLine( address ) ); }
@Test public void getSingleLineOneLine() { final Address address = new Address().addLine( "Lower Road 20" ); Assert.assertEquals( "Lower Road 20", utils.getSingleLine( address ) ); }