@Test
public void testPOST_data() throws Exception {

    PacketFactory factory = new PacketFactory("http://example.com/");
    List<Packet> packets = factory.buildPackets(Arrays.asList(new Event("straw"), new Event("berries")));
    assertEquals("straw", packets.get(0).getPostData().getJSONArray("requests").get(0));
    assertEquals("berries", packets.get(0).getPostData().getJSONArray("requests").get(1));
}