@Test
public void testInvalidPrice() throws JSONException
{

  String tuple = "{" + "\"id\": 2," + "\"name\": \"An ice sculpture\"," + "\"price\": -1,"
      + "\"tags\": [\"cold\", \"ice\"]," + "\"dimensions\": {" + "\"length\": 7.0," + "\"width\" : 8.0,"
      + "\"height\": 9.5" + "}," + "\"warehouseLocation\": {" + "\"latitude\": -78.75," + "\"longitude\": 20.4"
      + "}," + "\"dateOfManufacture\": \"2013/09/29\"," + "\"dateOfExpiry\": \"2013\"" + "}";
  parser.beginWindow(0);
  parser.in.process(tuple.getBytes());
  parser.endWindow();
  Assert.assertEquals(0, objectPort.collectedTuples.size());
  Assert.assertEquals(0, pojoPort.collectedTuples.size());
  Assert.assertEquals(1, error.collectedTuples.size());
  KeyValPair<String, String> errorKeyValPair = (KeyValPair<String, String>)error.collectedTuples.get(0);
  Assert.assertEquals(tuple, errorKeyValPair.getKey());
  Assert.assertEquals("\"/price\":\"number is lower than the required minimum\"", errorKeyValPair.getValue());
}