@Test
public void testReceiveAndMirror() throws IOException {

  PacketReceiver pr = new PacketReceiver(false);
  // Test three different lengths, to force reallocing
  // the buffer as it grows.
  doTestReceiveAndMirror(pr, 100, 10);
  doTestReceiveAndMirror(pr, 50, 10);
  doTestReceiveAndMirror(pr, 150, 10);
  pr.close();
}