@Test
public void FoldFnTest()
{

  FoldFn<String, String> concat = new FoldFn<String, String>()
  {
    @Override
    public String merge(String accumulatedValue1, String accumulatedValue2)
    {
      return fold(accumulatedValue1, accumulatedValue2);
    }
    @Override
    public String fold(String input1, String input2)
    {
      return input1 + ", " + input2;
    }
  };
  String[] ss = new String[]{"b", "c", "d", "e"};
  String base = "a";
  for (String s : ss) {
    base = concat.accumulate(base, s);
  }
  Assert.assertEquals("a, b, c, d, e", base);
}