AbstractEvictionList implements EvictionList { @Override public synchronized void appendEntry(final EvictionNode evictionNode) { if (evictionNode.next() != null) { return; } if (logger.isTraceEnabled(LogMarker.LRU_CLOCK_VERBOSE)) { logger.trace(LogMarker.LRU_CLOCK_VERBOSE, "adding a Node to lru list: {}", evictionNode); } evictionNode.setNext(tail); tail.previous().setNext(evictionNode); evictionNode.setPrevious(tail.previous()); tail.setPrevious(evictionNode); incrementSize(); } protected  AbstractEvictionList(EvictionController controller); @Override int size(); @Override void closeStats(); @Override EvictionCounters getStatistics(); @Override void clear(RegionVersionVector regionVersionVector, BucketRegion bucketRegion); @Override synchronized void appendEntry(final EvictionNode evictionNode); @Override synchronized void destroyEntry(EvictionNode evictionNode);  }
@Test public void appendEntryAlreadyInListDoesNothing() throws Exception { TestEvictionList evictionList = new TestEvictionList(controller); EvictionNode node = mock(EvictionNode.class); when(node.next()).thenReturn(mock(EvictionNode.class)); evictionList.appendEntry(node); verify(node, never()).unsetRecentlyUsed(); }