VpnWatchdog { void handlePacket(byte[] packetData) { if (!enabled) return; Log.d(TAG, "handlePacket: Received packet of length " + packetData.length); lastPacketReceived = System.currentTimeMillis(); }    }
@Test public void handlePacket() throws Exception { watchdog.lastPacketReceived = 0; watchdog.handlePacket(new byte[0]); assertNotEquals(0, watchdog.lastPacketReceived); }