MessageRoundtrip { public boolean isAnswered() { return answered; } MessageRoundtrip(Message msg); boolean isAnswered(); void answer(); long getRetryTimes(); void incRetryTimes(); void saveTime(); boolean hasToRetry(); Message getMsg();  }
@Test public void testMessageNotAnswered(){ P2pMessage message = mock(P2pMessage.class); MessageRoundtrip messageRoundtrip = new MessageRoundtrip(message); assertFalse(messageRoundtrip.isAnswered()); }