### Question:
Dstu3CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils { @Override @Nullable public String getCode( @Nullable ICompositeType codeableConcept, @Nullable String system ) { if ( system == null ) { throw new IllegalArgumentException( "System must be specified." ); } if ( codeableConcept == null ) { return null; } for ( final Coding coding : ((CodeableConcept) codeableConcept).getCoding() ) { if ( system.equals( coding.getSystem() ) ) { return coding.getCode(); } } return null; } Dstu3CodeFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext,
        @Nonnull CodeRepository codeRepository,
        @Nonnull SystemCodeRepository systemCodeRepository ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override List<SystemCodeValue> getSystemCodeValues( @Nullable ICompositeType codeableConcept ); @Override @Nullable String getCode( @Nullable ICompositeType codeableConcept, @Nullable String system ); @Override boolean containsMappingCode( @Nullable ICompositeType codeableConcept, @Nullable Object mappingCodes ); @Override boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code );  }### Answer:
@Test public void getCodeSystemNull() { Assert.assertNull( utils.getCode( null, "http: }
@Test public void getCodeNotFound() { final CodeableConcept codeableConcept = new CodeableConcept(); codeableConcept.addCoding( new Coding().setSystem( "http: .addCoding( new Coding().setSystem( "http: Assert.assertNull( utils.getCode( codeableConcept, "http: }
@Test public void getCode() { final CodeableConcept codeableConcept = new CodeableConcept(); codeableConcept.addCoding( new Coding().setSystem( "http: .addCoding( new Coding().setSystem( "http: Assert.assertEquals( "C2", utils.getCode( codeableConcept, "http: }