### Question:
R4ImmunizationFhirToDhisTransformerUtils extends AbstractImmunizationFhirToDhisTransformerUtils { @Override public int getMaxDoseSequence( @Nullable IDomainResource immunization ) throws TransformerException { if ( immunization == null ) { return 0; } return ((Immunization) immunization).getProtocolApplied().stream().map( Immunization.ImmunizationProtocolAppliedComponent::getDoseNumberPositiveIntType ) .map( PrimitiveType::getValue ).max( Comparator.naturalOrder() ).orElse( 0 ); } R4ImmunizationFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Override int getMaxDoseSequence( @Nullable IDomainResource immunization );  }### Answer:
@Test public void testMaxDoseSequence() { final Immunization immunization = new Immunization(); immunization.addProtocolApplied().setDoseNumber( new PositiveIntType( 10 ) ); immunization.addProtocolApplied().setDoseNumber( new PositiveIntType( 12 ) ); immunization.addProtocolApplied().setDoseNumber( new PositiveIntType( 8 ) ); Assert.assertEquals( 12, utils.getMaxDoseSequence( immunization ) ); }