@Test
public void testMetadataMatch()
    throws JsonSyntaxException, UnsupportedEncodingException, IOException {

  JsonParser parser = new JsonParser();
  TestContext t = new TestContext();
  t.setFunctionName("foo");
  LambdaContext lctx = new LambdaContext(t);
  JsonElement input = parser.parse(getResourceString("array_input.json"));
  GenericJsonEvent devent = new GenericJsonEvent(input.getAsJsonObject());
  ArraySplitOperation operation = new ArraySplitOperation("$.arr");
  InternalEvent ievent = new InternalEvent("", lctx, 1);
  ievent.setEventObj(devent);
  List<InternalEvent> events = operation.perform(ievent);
  assertEquals(new Long(1), events.get(0).getEventMetadata().get("arrivalEpochMs"));
  assertEquals("6a00541bfa24fd59884de557be71f3a5a1344613",
      events.get(0).getEventMetadata().get("eventSha1Hash"));
  assertEquals(new Long(1), events.get(1).getEventMetadata().get("arrivalEpochMs"));
  assertEquals("5cbc013a144777d9ce51385ac24a95ce05f77075",
      events.get(1).getEventMetadata().get("eventSha1Hash"));
  assertEquals(new Long(1), events.get(2).getEventMetadata().get("arrivalEpochMs"));
  assertEquals("6c3023db7ef03721c27df9f33b26e0d2cbc84d6b",
      events.get(2).getEventMetadata().get("eventSha1Hash"));
}