@Test
public void testDeleteField() throws FieldNotFoundException {

  GenericJsonEvent event = getEmptyEvent();
  event.setField("$.foo", "bar");
  event.setField("$.baz", "qux");
  JsonObject payload = (JsonObject) event.getPayload();
  event.deleteField("$.foo");
  assertEquals(2, payload.size());
  assertEquals(null, payload.get("foo"));
  assertEquals("qux", payload.get("baz").getAsString());
  assertEquals("b", payload.get("a").getAsString());
}