/** {@inheritDoc} */ @Before public void setUp() { ts = new Timestamp(); ts.setNodeId("node1"); ts.setSeqNumber(10); theSummary = new Summary(); setInternalState(theSummary, data); }
/** * Test for the {@link * org.coderebels.tsaenode.core.common.Summary#update(org.coderebels.tsaenode.core.common.Timestamp)} * method when timestamp has already been summarized */ @Test public void testUpdate_timestampAlreadySummarized() { String nodeId = ts.getNodeId(); Timestamp last = new Timestamp(); last.setNodeId(nodeId); last.setSeqNumber(100); doReturn(last).when(data).get(nodeId); theSummary.update(ts); verify(data, never()).put(nodeId, ts); }