### Question:
NodeTable { public synchronized void touchNode(Node n) { NodeEntry e = new NodeEntry(node.getId(), n); for (NodeBucket b : buckets) { if (b.getNodes().contains(e)) { b.getNodes().get(b.getNodes().indexOf(e)).touch(); break; } } } NodeTable(Node n); Node getNode(); final void initialize(); synchronized Node addNode(Node n); synchronized void dropNode(Node n); synchronized boolean contains(Node n); synchronized void touchNode(Node n); int getBucketsCount(); synchronized NodeBucket[] getBuckets(); int getBucketId(NodeEntry e); synchronized int getNodesCount(); synchronized List<NodeEntry> getAllNodes(); synchronized List<Node> getClosestNodes(byte[] targetId);  }### Answer:
@Test public void touchNodeTest() throws Exception { Node node = new Node(ids.get(0), ips[0], 18888, 18888); nodeTable.addNode(node); long firstTouchTime = nodeTable.getAllNodes().get(0).getModified(); TimeUnit.MILLISECONDS.sleep(10); nodeTable.touchNode(node); long lastTouchTime = nodeTable.getAllNodes().get(0).getModified(); Assert.assertTrue(firstTouchTime < lastTouchTime); }