@Test public void testHasToRetry(){ P2pMessage message = mock(P2pMessage.class); MessageRoundtrip messageRoundtrip = new MessageRoundtrip(message); messageRoundtrip.saveTime(); assertFalse(messageRoundtrip.hasToRetry()); }
public boolean hasToRetry() { return 20000 < System.currentTimeMillis() - lastTimestamp; }
MessageRoundtrip { public boolean hasToRetry() { return 20000 < System.currentTimeMillis() - lastTimestamp; } }
MessageRoundtrip { public boolean hasToRetry() { return 20000 < System.currentTimeMillis() - lastTimestamp; } MessageRoundtrip(Message msg); }
MessageRoundtrip { public boolean hasToRetry() { return 20000 < System.currentTimeMillis() - lastTimestamp; } MessageRoundtrip(Message msg); boolean isAnswered(); void answer(); long getRetryTimes(); void incRetryTimes(); void saveTime(); boolean hasToRetry(); Message getMsg(); }
MessageRoundtrip { public boolean hasToRetry() { return 20000 < System.currentTimeMillis() - lastTimestamp; } MessageRoundtrip(Message msg); boolean isAnswered(); void answer(); long getRetryTimes(); void incRetryTimes(); void saveTime(); boolean hasToRetry(); Message getMsg();  }