### Question:
CommonCodeSystemsTerminologyService implements IValidationSupport { public static String getCodeSystemUrl(@Nonnull IBaseResource theCodeSystem) { String url; switch (theCodeSystem.getStructureFhirVersionEnum()) { case R4: { url = ((org.hl7.fhir.r4.model.CodeSystem) theCodeSystem).getUrl(); break; } case R5: { url = ((org.hl7.fhir.r5.model.CodeSystem) theCodeSystem).getUrl(); break; } case DSTU3: default: throw new IllegalArgumentException("Can not handle version: " + theCodeSystem.getStructureFhirVersionEnum()); } return url; } CommonCodeSystemsTerminologyService(FhirContext theFhirContext); @Override CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet); @Override CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl); @Nullable CodeValidationResult validateLookupCode(ValidationSupportContext theValidationSupportContext, String theCode, String theSystem); @Override LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode); @Override IBaseResource fetchCodeSystem(String theSystem); @Override boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem); @Override boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl); @Override FhirContext getFhirContext(); static String getValueSetUrl(@Nonnull IBaseResource theValueSet); static String getCodeSystemUrl(@Nonnull IBaseResource theCodeSystem); static String getValueSetVersion(@Nonnull IBaseResource theValueSet); static final String LANGUAGES_VALUESET_URL; static final String MIMETYPES_VALUESET_URL; static final String MIMETYPES_CODESYSTEM_URL; static final String CURRENCIES_CODESYSTEM_URL; static final String CURRENCIES_VALUESET_URL; static final String COUNTRIES_CODESYSTEM_URL; static final String UCUM_CODESYSTEM_URL; static final String UCUM_VALUESET_URL; }### Answer:
@Test public void testFetchCodeSystemUrlDstu3() { try { CommonCodeSystemsTerminologyService.getCodeSystemUrl(new org.hl7.fhir.dstu3.model.CodeSystem()); fail(); } catch (IllegalArgumentException e) { assertEquals("Can not handle version: DSTU3", e.getMessage()); } }