### Question:
RemoteTerminologyServiceValidationSupport extends BaseValidationSupport implements IValidationSupport { @Override public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) { if (theOptions != null) { if (theOptions.isInferSystem()) { return null; } } IBaseResource valueSet = theValueSet; String valueSetUrl = DefaultProfileValidationSupport.getConformanceResourceUrl(myCtx, valueSet); if (isNotBlank(valueSetUrl)) { valueSet = null; } else { valueSetUrl = null; } return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, valueSetUrl, valueSet); } 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 testValidateCodeInValueSet_SystemCodeDisplayVS_Good() { createNextValueSetReturnParameters(true, DISPLAY, null); ValueSet valueSet = new ValueSet(); valueSet.setUrl(VALUE_SET_URL); IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(null, new ConceptValidationOptions(), CODE_SYSTEM, CODE, DISPLAY, valueSet); 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.getValueAsString()); assertEquals(null, myValueSetProvider.myLastValueSet); }
@Test public void testValidateCodeInValueSet_InferSystem() { createNextValueSetReturnParameters(true, DISPLAY, null); ValueSet valueSet = new ValueSet(); valueSet.setUrl(VALUE_SET_URL); IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(null, new ConceptValidationOptions().setInferSystem(true), null, CODE, DISPLAY, valueSet); assertEquals(null, outcome); }