### Question:
RatesCurveGroupDefinitionCsvLoader { public static void writeCurveGroup(File file, RatesCurveGroup... groups) { try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) { writeCurveGroup(writer, groups); } catch (IOException ex) { throw new UncheckedIOException(ex); } } private  RatesCurveGroupDefinitionCsvLoader(); static List<RatesCurveGroupDefinition> loadCurveGroupDefinitions(ResourceLocator groupsResource); static List<RatesCurveGroupDefinition> parseCurveGroupDefinitions(CharSource groupsCharSource); static void writeCurveGroupDefinition(File file, RatesCurveGroupDefinition... groups); static void writeCurveGroupDefinition(Appendable underlying, RatesCurveGroupDefinition... groups); static void writeCurveGroup(File file, RatesCurveGroup... groups); static void writeCurveGroup(Appendable underlying, RatesCurveGroup... groups);  }### Answer:
@Test public void test_writeCurveGroup() { List<RatesCurveGroup> curveGroups = RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_1), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2))); Appendable underlying = new StringBuilder(); RatesCurveGroupDefinitionCsvLoader.writeCurveGroup(underlying, curveGroups.get(0)); String created = underlying.toString(); String expected = "Group Name,Curve Type,Reference,Curve Name" + System.lineSeparator() + "Default,discount,USD,USD-Disc" + System.lineSeparator() + "Default,forward,USD-LIBOR-3M,USD-3ML" + System.lineSeparator(); assertThat(created).isEqualTo(expected); }