ChainNodeMap extends HashMap<String, AbstractChainOfResponsibilityHandler> { public AbstractChainOfResponsibilityHandler getFirstNode() { if (orderMap.isEmpty()) { return null; } Iterator<Integer> iterator = orderMap.keySet().iterator(); return orderMap.get(iterator.next()); }  void handleRequest(Object inputData, int rowNum); AbstractChainOfResponsibilityHandler put(String key, AbstractChainOfResponsibilityHandler value,
            int executeIndex); void linkNodes(int executeIndex, AbstractChainOfResponsibilityHandler value); AbstractChainOfResponsibilityHandler getFirstNode(); Map<Integer, AbstractChainOfResponsibilityHandler> getOrderMap();  }
@Test public void testGetFirstNodeEmptyCase() { ChainNodeMap nodeMap = new ChainNodeMap(); AbstractChainOfResponsibilityHandler firstNode = nodeMap.getFirstNode(); Assert.assertNull("The firstNode should be null", firstNode); }