@Before public void setUp() { hostWithCpus = new VDS(); hostWithCpus.setId(Guid.newGuid()); hostWithCpus.setOnlineCpus("0, 1, 2,3, 5"); hostWithoutCpus = new VDS(); hostWithoutCpus.setId(Guid.newGuid()); hostWithoutCpus.setOnlineCpus(null); perHostMessages = new PerHostMessages(); vm = new VM(); vm.setId(Guid.newGuid()); cluster = new Cluster(); }
/** No information about online cpus is available */ @Test public void shouldConsiderHostWithNoCpuData() { hostWithoutCpus.setOnlineCpus(null); assertThat(filter(), hasItem(hostWithoutCpus)); assertThat(messages(), is(empty())); }