@Test
public void testNoMatches()
{

  String string = "abcd";
  String regex = "^(?<myfield>\\d+)"; // will not match anything in the string
  // set up the operator with the regex
  RegexMatchMapOperator oper = new RegexMatchMapOperator();
  oper.setRegex(regex);
  // stub output port
  CollectorTestSink<Object> sink = new CollectorTestSink<Object>();
  oper.output.setSink(sink);
  // process the string
  oper.beginWindow(0);
  oper.data.process(string);
  oper.endWindow();
  // debugging output
  log.debug(String.format("Line is  : %s", string));
  log.debug(String.format("Regex is : %s", regex));
  // ensure nothing was emitted
  Assert.assertEquals("number emitted tuples", 0, sink.collectedTuples.size());
}