### Question:
AvroConverter { public static List<Schema> generateSchemas(FhirContext context, Map<String, List<String>> resourceTypeUrls) { StructureDefinitions structureDefinitions = StructureDefinitions.create(context); Map<String, HapiConverter<Schema>> converters = new HashMap<>(); for (Entry<String, List<String>> resourceTypeUrlEntry: resourceTypeUrls.entrySet()) { visitResource(context, structureDefinitions, resourceTypeUrlEntry.getKey(), resourceTypeUrlEntry.getValue(), converters); } return converters.values() .stream() .map(HapiConverter::getDataType) .collect(Collectors.toList()); } private  AvroConverter(HapiConverter<Schema> hapiToAvroConverter,
      RuntimeResourceDefinition... resources); static List<Schema> generateSchemas(FhirContext context,
      Map<String, List<String>> resourceTypeUrls); static AvroConverter forResource(FhirContext context,
      String resourceTypeUrl); static AvroConverter forResource(FhirContext context,
      String resourceTypeUrl,
      List<String> containedResourceTypeUrls); IndexedRecord resourceToAvro(IBaseResource resource); IBaseResource avroToResource(IndexedRecord record); Schema getSchema(); String getResourceType();  }### Answer:
@Test public void testCompile() throws IOException { List<Schema> schemas = AvroConverter.generateSchemas(FhirContexts.forStu3(), ImmutableMap.of(TestData.US_CORE_PATIENT, Collections.emptyList(), TestData.VALUE_SET, Collections.emptyList(), TestData.US_CORE_MEDICATION_REQUEST, ImmutableList.of(TestData.US_CORE_MEDICATION))); Protocol protocol = new Protocol("fhir-test", "FHIR Resources for Testing", null); protocol.setTypes(schemas); SpecificCompiler compiler = new SpecificCompiler(protocol); Path generatedCodePath = Files.createTempDirectory("generated_code"); generatedCodePath.toFile().deleteOnExit(); compiler.compileToDestination(null, generatedCodePath.toFile()); Set<String> javaFiles = Files.find(generatedCodePath, 10, (path, basicFileAttributes) -> true) .map(path -> generatedCodePath.relativize(path)) .map(Object::toString) .collect(Collectors.toSet()); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/Period.java")); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/Coding.java")); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/ValueSet.java")); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/us/core/Patient.java")); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/us/core/UsCoreRace.java")); Assert.assertTrue(javaFiles.contains("com/cerner/bunsen/stu3/avro/ChoiceBooleanInteger.java")); Assert.assertTrue(javaFiles.contains( "com/cerner/bunsen/stu3/avro/us/core/MedicationRequestContained.java")); }