### Question:
DatabaseTableConfigLoader { public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } }  static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader); static DatabaseTableConfig<T> fromReader(BufferedReader reader); static void write(BufferedWriter writer, DatabaseTableConfig<T> config);  }### Answer:
@Test public void testConfigFile() throws Exception { DatabaseTableConfig<NoFields> config = new DatabaseTableConfig<NoFields>(); StringBuilder body = new StringBuilder(); StringWriter writer = new StringWriter(); BufferedWriter buffer = new BufferedWriter(writer); Class<NoFields> clazz = NoFields.class; config.setDataClass(clazz); body.append("dataClass=").append(clazz.getName()).append(LINE_SEP); checkConfigOutput(config, body, writer, buffer, false); String tableName = "pojgefwpjoefwpjo"; config.setTableName(tableName); body.append("tableName=").append(tableName).append(LINE_SEP); checkConfigOutput(config, body, writer, buffer, false); DatabaseFieldConfig field1 = new DatabaseFieldConfig(); String columnName = "efjpowefpjoefw"; field1.setColumnName(columnName); config.setFieldConfigs(Arrays.asList(field1)); StringWriter fieldWriter = new StringWriter(); BufferedWriter fieldBuffer = new BufferedWriter(fieldWriter); DatabaseFieldConfigLoader.write(fieldBuffer, field1, tableName); fieldBuffer.flush(); body.append("# --table-fields-start--").append(LINE_SEP); body.append(fieldWriter.toString()); checkConfigOutput(config, body, writer, buffer, true); }