HostBO { public boolean registerHost(TxtHostRecord hostObj) { try { if (hostObj != null) { HostConfigData hostConfigObj = new HostConfigData(); hostConfigObj.setTxtHostRecord(hostObj); hostConfigObj.setBiosWLTarget(HostWhiteListTarget.BIOS_OEM); hostConfigObj.setVmmWLTarget(HostWhiteListTarget.VMM_OEM); return (registerHostFromCustomData(hostConfigObj)); } else { log.error("Input not specified for registering the host."); return false; } } catch (MSException me) { log.error("Error during host registration. " + me.getErrorCode() + " :" + me.getErrorMessage()); throw me; } catch (Exception ex) { log.error("Unexpected errror during host registration. ", ex); throw new MSException(ErrorCode.MS_HOST_REGISTRATION_ERROR, ex.getClass().getSimpleName()); } } HostBO(); String getPlatformName(String processorNameOrCPUID); boolean registerHost(TxtHostRecord hostObj); HostConfigResponseList registerHosts(TxtHostRecordList hostRecords); HostConfigResponseList registerHosts(HostConfigDataList hostRecords); boolean registerHostFromCustomData(HostConfigData hostConfigObj); boolean configureWhiteListFromHost(TxtHostRecord gkvHost); boolean configureWhiteListFromCustomData(WhitelistConfigurationData hostConfigObj); boolean configureWhiteListFromCustomData(WhitelistConfigurationData hostConfigObj, Nonce challenge); String getNextAvailableBIOSMLEName(String biosName, String biosVersion, String oemName); String getNextAvailableVMMMLEName(String vmmName, String vmmVersion, String osName, String osVersion);  }
@Test public void testRegisterHost() throws Exception { System.out.println("registerHost"); TxtHostRecord hostObj = new TxtHostRecord(); hostObj.HostName = "10.1.71.169"; hostObj.IPAddress = "10.1.71.169"; hostObj.Port = 9999; HostBO instance = MSComponentFactory.getHostBO(); boolean expResult = true; boolean result = instance.registerHost(hostObj); assertEquals(expResult, result); }