OSCBundle implements OSCPacket { @SuppressWarnings("WeakerAccess") public void setTimestamp(final OSCTimeTag64 timestamp) { checkNonNullTimestamp(timestamp); this.timestamp = timestamp; } OSCBundle();  OSCBundle(final OSCTimeTag64 timestamp);  OSCBundle(final List<OSCPacket> packets);  OSCBundle(final List<OSCPacket> packets, final OSCTimeTag64 timestamp); OSCTimeTag64 getTimestamp(); @SuppressWarnings("WeakerAccess") void setTimestamp(final OSCTimeTag64 timestamp); void addPacket(final OSCPacket packet); List<OSCPacket> getPackets();  }
@Test public void testSendBundleImmediateExplicit() throws Exception { final Date timeNow = GregorianCalendar.getInstance().getTime(); final OSCTimeTag64 timestampNow = OSCTimeTag64.valueOf(timeNow); List<OSCPacket> packetsSent = new ArrayList<>(1); packetsSent.add(new OSCMessage("/dummy")); OSCBundle bundle = new OSCBundle(packetsSent, timestampNow); bundle.setTimestamp(OSCTimeTag64.IMMEDIATE); sendBundleTimestampTestHelper(bundle, OSCTimeTag64.IMMEDIATE); }
@Test(expected=IllegalArgumentException.class) public void testSendBundleImmediateExplicitNull() throws Exception { final Date timeNow = GregorianCalendar.getInstance().getTime(); final OSCTimeTag64 timestampNow = OSCTimeTag64.valueOf(timeNow); List<OSCPacket> packetsSent = new ArrayList<>(1); packetsSent.add(new OSCMessage("/dummy")); OSCBundle bundle = new OSCBundle(packetsSent, timestampNow); bundle.setTimestamp(null); sendBundleTimestampTestHelper(bundle, OSCTimeTag64.IMMEDIATE); }