Packet { public long getTimeStamp() { return mTimeStamp; } Packet(String targetURL);  Packet(String targetURL, @Nullable JSONObject JSONObject, int eventCount); String getTargetURL(); @Nullable JSONObject getPostData(); long getTimeStamp(); int getEventCount(); @NonNull @Override String toString();  }
@Test public void testTimeStamp() { Packet testPacket = new Packet(""); long timeStamp = System.currentTimeMillis(); assertTrue(timeStamp - testPacket.getTimeStamp() < 5); }