### Question:
ParquetDataFormatter implements Formatter { @Override public byte[] getBuffer(List<SDKField> sdkFields, List<List<Object>> dataTable) throws ConnectorSDKException { try { Map<String, String> mapSDKFields = new LinkedHashMap<>(); for (SDKField field : sdkFields) { mapSDKFields.put(field.getName(), ""); } param.getDataSet().matchFlattenedSchemaFields(mapSDKFields); List<SDKField> newFields = new ArrayList<>(); for (SDKField field : sdkFields) { String mappedName = mapSDKFields.get(field.getName()); if ("".equals(mappedName)) { mappedName = field.getName(); } newFields.add(new SDKField(mappedName, "typeNotRequired")); } return getBuffer( MapperUtil.convert( newFields, dataTable )); } catch (Exception ex) { logger.severe("Error while getting buffer from data table: " + ex); throw new ConnectorSDKException("Error while getting buffer from data table", ex); } } ParquetDataFormatter(ParquetIOWriter writer,
                                DataWiringParam param,
                                ParquetFieldConverter<JSONObject> jsonFieldConverter,
                                ParquetFieldConverter<List<SchemaField>> schemaFieldConverter,
                                Extractor<JSONObject> extractor,
                                ValidationRegistry validationRegistry,
                                boolean isFullSchemaRequired); @Override byte[] getBuffer(List<SDKField> sdkFields, List<List<Object>> dataTable); @Override byte[] getBuffer(List<JSONObject> dataTable);  }### Answer:
@Test public void testGetBuffer() throws ParseException, ConnectorSDKException { assert (parquetDataFormatter.getBuffer(getMockPipelineData()) != null); }
@Test public void testVariableData() throws ParseException, ConnectorSDKException { List<JSONObject> dataTable = new ArrayList<>(); JSONParser parser = new JSONParser(); JSONObject json1 = (JSONObject) parser.parse("{\"createtime\":0,\"id1\":\"value1\"}"); JSONObject json2 = (JSONObject) parser.parse("{\"id1\":\"value1\"}"); dataTable.add(json1); dataTable.add(json2); assert (parquetDataFormatter.getBuffer(dataTable) != null); }