### Question:
ClouderaAPIUtil { public static NavigatorNode retrieveNavigatorNode(String name, List<NavigatorNode> navigatorNodes) { for (NavigatorNode navigatorNode : navigatorNodes) { if (name.equals(navigatorNode.getName())) { return navigatorNode; } } return null; }  static boolean isFileInputOutputComponent(String componentName); static String getDatasetName(String path); static NavigatorNode retrieveNavigatorNode(String name, List<NavigatorNode> navigatorNodes); static Boolean isFieldinComponent(String componentName, String fieldName, List<NavigatorNode> navigatorNodes); static String extractNavigatorURL(String navigatorUrl); static final String[] FILE_INPUT_OUTPUT_COMPONENT_PREFIXS; }### Answer:
@Test public void TestRetrieveNavigatorNode() { List<NavigatorNode> navigatorNodes = new ArrayList<NavigatorNode>(); Map<String, String> schema = new HashMap<String, String>(); schema.put("id", "int"); NavigatorNode nav1 = new NavigatorNode("comp1", schema, null, null); navigatorNodes.add(nav1); NavigatorNode nav2 = new NavigatorNode("comp2", schema, null, null); navigatorNodes.add(nav2); assertNotNull(ClouderaAPIUtil.retrieveNavigatorNode("comp1", navigatorNodes)); assertEquals("comp1", ClouderaAPIUtil.retrieveNavigatorNode("comp1", navigatorNodes).getName()); assertNotNull(ClouderaAPIUtil.retrieveNavigatorNode("comp2", navigatorNodes)); assertEquals("comp2", ClouderaAPIUtil.retrieveNavigatorNode("comp2", navigatorNodes).getName()); assertNull(ClouderaAPIUtil.retrieveNavigatorNode("comp3", navigatorNodes)); }