kvWriter.write(kvp.getKey(), kvp.getvalue());
}
events = kvOutput.close();
assertTrue(events != null && events.size() == 1);
DataMovementEvent dmEvent = (DataMovementEvent)events.get(0);
assertEquals("Invalid source index", 0, dmEvent.getSourceIndex());
DataMovementEventPayloadProto shufflePayload = DataMovementEventPayloadProto
.parseFrom(dmEvent.getUserPayload());
assertTrue(shufflePayload.getOutputGenerated());
assertEquals(outputContext.getUniqueIdentifier(), shufflePayload.getPathComponent());
assertEquals(shufflePort, shufflePayload.getPort());
assertEquals("host", shufflePayload.getHost());