Exemplo n.º 1
0
 public void testUnknownPollNak() throws Exception {
   MyV3LcapMessage src = makePollAckMessage(V3LcapMessage.PollNak.NAK_NO_TIME);
   src.setTestNak("KNACKERED");
   InputStream srcStream = src.getInputStream();
   V3LcapMessage copy = new V3LcapMessage(srcStream, tempDir, theDaemon);
   assertEqualMessages(src, copy);
   assertNotNull(src.getNak());
   assertNotNull(copy.getNak());
   assertEquals(V3LcapMessage.PollNak.NAK_NO_TIME, src.getNak());
   assertEquals(V3LcapMessage.PollNak.NAK_UNKNOWN, copy.getNak());
 }
Exemplo n.º 2
0
  private MyV3LcapMessage makePollAckMessage(V3LcapMessage.PollNak nak) {
    MyV3LcapMessage msg =
        new MyV3LcapMessage(
            "ArchivalID_2",
            "key",
            "Plug42",
            m_testBytes,
            m_testBytes,
            V3LcapMessage.MSG_POLL_ACK,
            987654321,
            m_testID,
            tempDir,
            theDaemon);
    if (nak != null) {
      msg.setNak(nak);
    }

    return msg;
  }