### Question:
RatesCurvesCsvLoader { public static ImmutableList<RatesCurveGroup> load( LocalDate marketDataDate, ResourceLocator groupsResource, ResourceLocator settingsResource, Collection<ResourceLocator> curveValueResources) { Collection<CharSource> curveCharSources = curveValueResources.stream().map(r -> r.getCharSource()).collect(toList()); ListMultimap<LocalDate, RatesCurveGroup> map = parse( d -> marketDataDate.equals(d), groupsResource.getCharSource(), settingsResource.getCharSource(), curveCharSources); return ImmutableList.copyOf(map.get(marketDataDate)); } private  RatesCurvesCsvLoader(); static ImmutableList<RatesCurveGroup> load(
      LocalDate marketDataDate,
      ResourceLocator groupsResource,
      ResourceLocator settingsResource,
      Collection<ResourceLocator> curveValueResources); static ImmutableListMultimap<LocalDate, RatesCurveGroup> loadAllDates(
      ResourceLocator groupsResource,
      ResourceLocator settingsResource,
      Collection<ResourceLocator> curveValueResources); static ImmutableListMultimap<LocalDate, RatesCurveGroup> parse(
      Predicate<LocalDate> datePredicate,
      CharSource groupsCharSource,
      CharSource settingsCharSource,
      Collection<CharSource> curveValueCharSources); static void writeCurveSettings(File file, RatesCurveGroup group); static void writeCurveSettings(Appendable underlying, RatesCurveGroup group); static void writeCurveNodes(File file, LocalDate valuationDate, RatesCurveGroup group); static void writeCurveNodes(Appendable underlying, LocalDate valuationDate, RatesCurveGroup group);  }### Answer:
@Test public void test_noSettings() { assertThatIllegalArgumentException() .isThrownBy(() -> RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_EMPTY), ImmutableList.of(ResourceLocator.of(CURVES_1)))) .withMessageMatching("Missing settings for curve: .*"); }
@Test public void test_single_curve_multiple_Files() { assertThatIllegalArgumentException() .isThrownBy(() -> RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_1), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_1)))) .withMessageMatching("Rates curve loader found multiple curves with the same name: .*"); }
@Test public void test_multiple_curves_single_file() { List<RatesCurveGroup> curveGroups = RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_1), ImmutableList.of(ResourceLocator.of(CURVES_1_AND_2))); assertCurves(curveGroups); }
@Test public void test_multiple_curves_multiple_files() { 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))); assertCurves(curveGroups); }
@Test public void test_invalid_curve_duplicate_points() { assertThatIllegalArgumentException() .isThrownBy(() -> RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_1), ImmutableList.of(ResourceLocator.of(CURVES_INVALID_DUPLICATE_POINTS)))); }
@Test public void test_load_curves_date_filtering() { List<RatesCurveGroup> curves = RatesCurvesCsvLoader.load( CURVE_DATE, ResourceLocator.of(GROUPS_1), ResourceLocator.of(SETTINGS_1), ImmutableList.of(ResourceLocator.of(CURVES_1), ResourceLocator.of(CURVES_2), ResourceLocator.of(CURVES_3))); assertCurves(curves); }