HostInfoImpl implements HostInfo { public Tool getTool(String id) { for (Tool tool : tools) { if (tool.getId().equals(id)) { return tool; } } return null; } HostInfoImpl();  HostInfoImpl(String id); void check(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); void setUsername(String username); void setHomeDirectory(String homeDirectory); void setId(String id); void setOs(OperatingSystem os); void setHostCapacity(int hostCapacity); void setVmCapacity(int vmCapacity); void setDataSpacesScratchURL(String url); void setDataSpacesScratchPath(PathElement path); void addTool(Tool tool); String getHomeDirectory(); String getId(); OperatingSystem getOS(); Tool getTool(String id); Set<Tool> getTools(); String getUsername(); int getHostCapacity(); int getVmCapacity(); String getDataSpacesScratchURL(); PathElement getDataSpacesScratchPath(); long getToplogyId(); void setTopologyId(long nodeId); boolean isCapacitiyValid(); void setNetworkInterface(String inet); String getNetworkInterface();  }
@Test public void getTool1() { Assert.assertNotNull(fullyInitialized.getTool("tool")); Assert.assertNull(fullyInitialized.getTool("tool2")); }