HostBO { public boolean configureWhiteListFromHost(TxtHostRecord gkvHost) throws ApiException { boolean configStatus; try { if (gkvHost != null) { WhitelistConfigurationData hostConfigObj = new WhitelistConfigurationData(); hostConfigObj.setTxtHostRecord(gkvHost); hostConfigObj.setBiosWhiteList(true); hostConfigObj.setVmmWhiteList(true); hostConfigObj.setBiosWLTarget(HostWhiteListTarget.BIOS_OEM); hostConfigObj.setVmmWLTarget(HostWhiteListTarget.VMM_OEM); hostConfigObj.setOverWriteWhiteList(false); hostConfigObj.setRegisterHost(false); if (hostConfigObj == null) throw new MSException(ErrorCode.AS_HOST_NOT_FOUND); configStatus = configureWhiteListFromCustomData(hostConfigObj); return configStatus; } else { log.error("Good know host has not been specified."); throw new MSException(ErrorCode.AS_HOST_NOT_FOUND); } } catch (MSException | ASException me) { log.error("Error during white list configuration. " + me.getErrorCode() + " :" + me.getErrorMessage()); throw me; } catch (Exception ex) { log.error("Unexpected error during white list configuration. ", ex); throw new MSException(ErrorCode.MS_WHITELIST_CONFIG_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 testConfigureWhiteListFromHost() throws Exception { System.out.println("configureWhiteListFromHost"); TxtHostRecord gkvHost = new TxtHostRecord(); gkvHost.HostName = "10.1.71.155"; gkvHost.AddOn_Connection_String = "vmware:https: HostBO instance = MSComponentFactory.getHostBO(); boolean expResult = false; boolean result = instance.configureWhiteListFromHost(gkvHost); assertEquals(expResult, result); fail("The test case is a prototype."); }