### Question:
RemoteTerminologyServiceValidationSupport extends BaseValidationSupport implements IValidationSupport { @Override public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, theValueSetUrl, null); } RemoteTerminologyServiceValidationSupport(FhirContext theFhirContext); @Override CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl); @Override CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet); @Override IBaseResource fetchCodeSystem(String theSystem); @Override IBaseResource fetchValueSet(String theValueSetUrl); @Override boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem); @Override boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl); void setBaseUrl(String theBaseUrl); void addClientInterceptor(@Nonnull Object theClientInterceptor);  }### Answer:
@Test public void testValidateCode_SystemCodeDisplayUrl_BlankCode() { IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, "", DISPLAY, VALUE_SET_URL); assertEquals(null, outcome); }
@Test public void testValidateCode_SystemCodeDisplayUrl_Success() { createNextValueSetReturnParameters(true, DISPLAY, null); IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, CODE, DISPLAY, VALUE_SET_URL); assertEquals(CODE, outcome.getCode()); assertEquals(DISPLAY, outcome.getDisplay()); assertEquals(null, outcome.getSeverity()); assertEquals(null, outcome.getMessage()); assertEquals(CODE, myValueSetProvider.myLastCode.getCode()); assertEquals(DISPLAY, myValueSetProvider.myLastDisplay.getValue()); assertEquals(CODE_SYSTEM, myValueSetProvider.myLastSystem.getValue()); assertEquals(VALUE_SET_URL, myValueSetProvider.myLastUrl.getValue()); assertEquals(null, myValueSetProvider.myLastValueSet); }
@Test public void testValidateCode_SystemCodeDisplayUrl_Error() { createNextValueSetReturnParameters(false, null, ERROR_MESSAGE); IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, CODE, DISPLAY, VALUE_SET_URL); assertEquals(null, outcome.getCode()); assertEquals(null, outcome.getDisplay()); assertEquals(IValidationSupport.IssueSeverity.ERROR, outcome.getSeverity()); assertEquals(ERROR_MESSAGE, outcome.getMessage()); assertEquals(CODE, myValueSetProvider.myLastCode.getCode()); assertEquals(DISPLAY, myValueSetProvider.myLastDisplay.getValue()); assertEquals(CODE_SYSTEM, myValueSetProvider.myLastSystem.getValue()); assertEquals(VALUE_SET_URL, myValueSetProvider.myLastUrl.getValue()); assertEquals(null, myValueSetProvider.myLastValueSet); }
@Test public void testValidateCodeInCodeSystem_Good() { createNextCodeSystemReturnParameters(true, DISPLAY, null); IValidationSupport.CodeValidationResult outcome = mySvc.validateCode(null, null, CODE_SYSTEM, CODE, DISPLAY, null); assertEquals(CODE, outcome.getCode()); assertEquals(DISPLAY, outcome.getDisplay()); assertEquals(null, outcome.getSeverity()); assertEquals(null, outcome.getMessage()); assertEquals(CODE, myCodeSystemProvider.myLastCode.getCode()); assertEquals(DISPLAY, myCodeSystemProvider.myLastDisplay.getValue()); assertEquals(CODE_SYSTEM, myCodeSystemProvider.myLastUrl.getValueAsString()); }