JsonFormatter extends Formatter<String> { @Override public void setup(OperatorContext context) { objMapper = new ObjectMapper(); }  @Override void setup(OperatorContext context); @Override String convert(Object tuple);  }
@Test public void testJSONToPOJONoFieldPOJO() { operator.endWindow(); operator.teardown(); operator.setup(null); operator.beginWindow(1); TestPojo o = new TestPojo(); operator.in.put(o); Assert.assertEquals(0, validDataSink.collectedTuples.size()); Assert.assertEquals(1, invalidDataSink.collectedTuples.size()); Assert.assertEquals(o, invalidDataSink.collectedTuples.get(0)); Assert.assertEquals(1, operator.getIncomingTuplesCount()); Assert.assertEquals(0, operator.getEmittedObjectCount()); Assert.assertEquals(1, operator.getErrorTupleCount()); }