### Question:
PlatformDataFormatterFactory implements DataFormatterFactory { @Override public Formatter getFormatter(FileFormat fileFormat) { Formatter formatter = null; switch (fileFormat) { case CSV: formatter = new CSVDataFormatter(param); break; case PARQUET: final List<SchemaField> fields = getFieldsFromDataSet(); final ParquetFieldConverter<JSONObject> jsonConverter = new JSONParquetFieldConverter(fields); Extractor<JSONObject> extractor = new JsonObjectsExtractor(); final ParquetFieldConverter<List<SchemaField>> schemaFieldConverter = new CachedCatalogSchemaParquetFieldConverter( new CatalogSchemaParquetFieldConverter() ); formatter = new ParquetDataFormatter( this.writer, this.param, jsonConverter, schemaFieldConverter, extractor, getValidationRegistry(fields), writeAttributes.isFullSchemaRequired() ); break; case JSON: formatter = new JSONDataFormatter(); break; } return formatter; } PlatformDataFormatterFactory(ParquetIOWriter writer, DataWiringParam param, ValidationRegistryFactory registryFactory); PlatformDataFormatterFactory setWriteAttributes(WriteAttributes writeAttributes); @Override Formatter getFormatter(FileFormat fileFormat);  }### Answer:
@Test public void testGetFormatter() { ParquetIOWriter writer = new ParquetIOWriterImpl(); PlatformDataFormatterFactory platFormatter = new PlatformDataFormatterFactory(writer, param, registryFactory); platFormatter.setWriteAttributes(new WriteAttributes.WriteAttributesBuilder().build()); assertTrue(platFormatter.getFormatter(FileFormat.CSV) != null); assertTrue(platFormatter.getFormatter(FileFormat.PARQUET) != null); assertTrue(platFormatter.getFormatter(FileFormat.JSON) != null); }