### Question:
ClouderaAPIUtil { public static Boolean isFieldinComponent(String componentName, String fieldName, List<NavigatorNode> navigatorNodes) { NavigatorNode outputNavigatorNode = ClouderaAPIUtil.retrieveNavigatorNode(componentName, navigatorNodes); return (outputNavigatorNode != null) && (outputNavigatorNode.getSchema().containsKey(fieldName)); }  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 TestIsThisComponentContainsThisField() { 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); assertTrue(ClouderaAPIUtil.isFieldinComponent("comp1", "id", navigatorNodes)); assertTrue(ClouderaAPIUtil.isFieldinComponent("comp2", "id", navigatorNodes)); assertFalse(ClouderaAPIUtil.isFieldinComponent("comp1", "nope", navigatorNodes)); assertFalse(ClouderaAPIUtil.isFieldinComponent("comp2", "nope", navigatorNodes)); assertFalse(ClouderaAPIUtil.isFieldinComponent("comp3", "id", navigatorNodes)); }