HostInfoImpl implements HostInfo { public void check() throws IllegalStateException { if (id == null) { throw new IllegalStateException("id field is not set in this HostInfo\n" + toString()); } if (homeDirectory == null) { throw new IllegalStateException("homeDirectory is not set for id=" + id + "\n" + toString()); } if (os == null) { throw new IllegalStateException("os is not set for id=" + id + "\n" + toString()); } if ((hostCapacity % vmCapacity) != 0) { throw new IllegalStateException("hostCapacity is not a multiple of vmCapacity for HostInfo=" + id + "\n" + toString()); } if (username == null) { GCMD_LOGGER.debug("HostInfo is ready but username has not been set"); } if (dataSpacesScratchURL == null) { GCMD_LOGGER.debug("HostInfo is ready but Data Spaces scratch space access URL has not been set"); } if (dataSpacesScratchPath == null) { GCMD_LOGGER.debug("HostInfo is ready but Data Spaces scratch space local access path has not been set"); } } 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(expected = IllegalStateException.class) public void checkReadygetHalfInitialized() { halfInitialized.check(); }
@Test(expected = IllegalStateException.class) public void checkReadygetHomeDirectory() { notInitialized.check(); }