### Question:
ZabbixDataSourceAdaptor implements HostDataSource { @Override public List<eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host> getHostList() { List<Host> hostsList = client.getAllHosts(); ArrayList<eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host> hosts = new ArrayList<>(); for (Host h : hostsList) { if (hostFilter.isHost(h)) { hosts.add(convert(h)); } } return hosts; }  static void main(String[] args); @Override eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host getHostByName(String hostname); @Override GeneralPurposePowerConsumer getGeneralPowerConsumerByName(String hostname); @Override VmDeployed getVmByName(String name); @Override List<eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host> getHostList(); List<eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host> getHostList(String groupName); @Override List<GeneralPurposePowerConsumer> getGeneralPowerConsumerList(); @Override List<VmDeployed> getVmList(); List<VmDeployed> getVmList(String groupName); @Override List<EnergyUsageSource> getHostAndVmList(); @Override List<HostMeasurement> getHostData(); @Override HostMeasurement getHostData(eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host host); @Override List<HostMeasurement> getHostData(List<eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host> hostList); @Override List<VmMeasurement> getVmData(); @Override VmMeasurement getVmData(VmDeployed vm); @Override List<VmMeasurement> getVmData(List<VmDeployed> vmList); ZabbixClient getClient(); void setClient(ZabbixClient client); @Override CurrentUsageRecord getCurrentEnergyUsage(eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host host); @Override double getLowestHostPowerUsage(eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host host); @Override double getHighestHostPowerUsage(eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host host); @Override double getCpuUtilisation(eu.ascetic.asceticarchitecture.iaas.energymodeller.types.energyuser.Host host, int lastNSeconds); ZabbixHostVMFilter getHostFilter(); void setHostFilter(ZabbixHostVMFilter hostFilter);  }### Answer:
@Test public void testGetHostList() { System.out.println("getHostList"); ZabbixDataSourceAdaptor instance = new ZabbixDataSourceAdaptor(); List<Host> expResult = new ArrayList<>(); expResult.addAll(hostList); List<Host> result = instance.getHostList(); assertEquals(result.size(), 4); for (Host host : expResult) { assert (result.contains(host)); System.out.println("Host name: " + host.getHostName()); System.out.println("Host id: " + host.getId()); } for (Host host : result) { assert (host.getRamMb() > 0); assert (host.getDiskGb() > 0); System.out.println("Host ram: " + host.getRamMb()); System.out.println("Host disk: " + host.getDiskGb()); } assertEquals(expResult.size(), result.size()); }