@Test
public void createAndConfigureHostResourcesTest() {

    HostVO hostVo = Mockito.mock(HostVO.class);
    Mockito.when(hostVo.getId()).thenReturn(1l);
    Mockito.when(hostVo.getName()).thenReturn("test");
    Mockito.when(hostVo.getSpeed()).thenReturn(2000l);
    Mockito.when(hostVo.getCpus()).thenReturn(4);
    Mockito.when(hostVo.getTotalMemory()).thenReturn(8000l);
    HostResources host = hostResourcesService.createAndConfigureHostResources(hostVo);
    Assert.assertEquals(1l, host.getHostId());
    Assert.assertEquals("test", host.getHostName());
    Assert.assertEquals(2000l, host.getSpeed());
    Assert.assertEquals(4, host.getCpus().intValue());
    Assert.assertEquals(8000l, host.getTotalMemoryInBytes());
}