@Test
public void testFallbackToResource() throws Exception
{

  FileSystemSchemaRegistryService.Config configBuilder = new FileSystemSchemaRegistryService.Config();
  configBuilder.setFallbackToResources(true);
  configBuilder.setSchemaDir("/no/such/dir");
  FileSystemSchemaRegistryService.StaticConfig config = configBuilder.build();
  FileSystemSchemaRegistryService service = FileSystemSchemaRegistryService.build(config);
  Map<Short,String > fakeSchemas =
      service.fetchAllSchemaVersionsBySourceName("com.linkedin.events.example.fake.FakeSchema");
  Assert.assertNotNull(fakeSchemas);
  Assert.assertTrue(2 <= fakeSchemas.size());
  String personSchema = service.fetchLatestSchemaBySourceName("com.linkedin.events.example.person.Person");
  Assert.assertNotNull(personSchema);
}