StartHostSystemVmService { protected NicVO getInternalCommunicationNicFromVm(Long startHostServiceVmId) { List<NicVO> nicsOfVm = nicDao.listByVmId(startHostServiceVmId); for (NicVO nic : nicsOfVm) { if (RESERVER_NAME.equals(nic.getReserver())) { return nic; } } logger.info(String.format("Could not find a NIC created by PodBasedNetworkGuru, vmId[%d]", startHostServiceVmId)); return null; }  boolean isStartHostSystemVmDeployedOnPod(Long podId); Long getStartHostServiceVmIdFromPod(Long podId); boolean isStartHostServiceVmRunningOnPod(Long podId); boolean isStartHostServiceVmReadyToStartHostOnPod(Long podId);  }
@Test public void getInternalCommunicationNicFromVmTest() { List<NicVO> nicsOfVm = new ArrayList<>(); NicVO nic = Mockito.mock(NicVO.class); Mockito.doReturn(RESERVER_NAME).when(nic).getReserver(); nicsOfVm.add(nic); executeGetInternalCommunicationNicFromVmTest(nicsOfVm, nic); Mockito.verify(nic).getReserver(); }