@Test
public void testGroupBy() throws Exception {

  Pipe p = Pump.prime()
      .each(new RegexFilter("^[0-9]+$", false), "line")
      .retain("line")
      .coerce("line", int.class)
      .each(new DateFormatter(new Fields("date"), "yyyy-MM-dd"))
      .retain("date")
      .groupby("date")
      .toPipe();

  CascadingHelper.get().getFlowConnector().connect(Tests.getInTap(), Tests.getOutTap(), p).complete();

  assertEquals(Arrays.asList("1970-01-01", "1970-01-02", "1970-01-02"), getOutputStrings());
}