PublishRequestTuple extends GenericRequestTuple { public static byte[] getSerializedRequest(final String version, final String identifier, final long startingWindowId) { return GenericRequestTuple.getSerializedRequest(version, identifier, startingWindowId, MessageType.PUBLISHER_REQUEST_VALUE); } PublishRequestTuple(byte[] array, int offset, int len); MessageType getType(); static byte[] getSerializedRequest(final String version, final String identifier, final long startingWindowId);  }
@Test public void testGetSerializedRequest() { String pubId = "TestPublisher"; long windowId = 0xcafebabe000000ffL; byte[] serial = PublishRequestTuple.getSerializedRequest(null, pubId, windowId); PublishRequestTuple request = (PublishRequestTuple)Tuple.getTuple(serial, 0, serial.length); assertEquals(request.identifier, pubId, "Identifier"); assertEquals((long)request.baseSeconds << 32 | request.windowId, windowId, "Window"); }