### Question:
AvroSchemaFileReaderFactory { public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); }  static AvroSchemaFileReaderFactory getInstance(); AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile);  }### Answer:
@Test public void testGetJsonReader() { assertTrue(avroSchemaFileReaderFactory.getAvroSchemaFileReader("foobar.avsc") instanceof JsonAvroSchemaFileReader); }
@Test public void testGetBinaryReader() { assertTrue(avroSchemaFileReaderFactory.getAvroSchemaFileReader("foobar.avro") instanceof BinaryAvroSchemaFileReader); }