HostSimple implements Host { @Override public void removeMigratingInVm(final Vm vm) { vmsMigratingIn.remove(vm); vmList.remove(vm); vm.setInMigration(false); } HostSimple(final List<Pe> peList);  HostSimple(final List<Pe> peList, final boolean activate);  HostSimple(
        final ResourceProvisioner ramProvisioner,
        final ResourceProvisioner bwProvisioner,
        final long storage,
        final List<Pe> peList);  HostSimple(final long ram, final long bw, final long storage, final List<Pe> peList);  HostSimple(final long ram, final long bw, final long storage, final List<Pe> peList, final boolean activate); static long getDefaultRamCapacity(); static void setDefaultRamCapacity(final long defaultCapacity); static long getDefaultBwCapacity(); static void setDefaultBwCapacity(final long defaultCapacity); static long getDefaultStorageCapacity(); static void setDefaultStorageCapacity(final long defaultCapacity); @SuppressWarnings("ForLoopReplaceableByForEach") @Override double updateProcessing(final double currentTime); @Override boolean createVm(final Vm vm); @Override boolean createTemporaryVm(final Vm vm); @Override void reallocateMigratingInVms(); @Override boolean isSuitableForVm(final Vm vm); @Override boolean isActive(); @Override boolean hasEverStarted(); @Override final Host setActive(final boolean activate); @Override void destroyVm(final Vm vm); @Override void destroyTemporaryVm(final Vm vm); @Override void destroyAllVms(); @Override Host addOnStartupListener(final EventListener<HostEventInfo> listener); @Override boolean removeOnStartupListener(final EventListener<HostEventInfo> listener); @Override Host addOnShutdownListener(final EventListener<HostEventInfo> listener); @Override boolean removeOnShutdownListener(final EventListener<HostEventInfo> listener); @Override long getNumberOfPes(); @Override int getFreePesNumber(); @Override double getMips(); @Override double getTotalMipsCapacity(); @Override double getTotalAvailableMips(); @Override double getTotalAllocatedMips(); @Override double getTotalAllocatedMipsForVm(final Vm vm); @Override Resource getBw(); @Override Resource getRam(); @Override Resource getStorage(); @Override long getId(); @Override final void setId(long id); @Override ResourceProvisioner getRamProvisioner(); @Override final Host setRamProvisioner(final ResourceProvisioner ramProvisioner); @Override ResourceProvisioner getBwProvisioner(); @Override final Host setBwProvisioner(final ResourceProvisioner bwProvisioner); @Override VmScheduler getVmScheduler(); @Override final Host setVmScheduler(final VmScheduler vmScheduler); @Override double getStartTime(); @Override double getFirstStartTime(); @Override void setStartTime(final double startTime); @Override double getShutdownTime(); @Override void setShutdownTime(final double shutdownTime); @Override double getUpTime(); @Override double getTotalUpTime(); @Override double getUpTimeHours(); @Override double getTotalUpTimeHours(); @Override double getIdleShutdownDeadline(); @Override Host setIdleShutdownDeadline(final double deadline); @Override List<Pe> getPeList(); @Override List<T> getVmList(); @Override List<T> getVmCreatedList(); @Override boolean isFailed(); @Override final boolean setFailed(final boolean failed); final void setPeStatus(final List<Pe> peList, final Pe.Status newStatus); @Override Set<T> getVmsMigratingIn(); @Override boolean addMigratingInVm(final Vm vm); @Override void removeMigratingInVm(final Vm vm); @Override Set<Vm> getVmsMigratingOut(); @Override boolean addVmMigratingOut(final Vm vm); @Override boolean removeVmMigratingOut(final Vm vm); @Override Datacenter getDatacenter(); @Override final void setDatacenter(final Datacenter datacenter); @Override String toString(); @Override boolean removeOnUpdateProcessingListener(final EventListener<HostUpdatesVmsProcessingEventInfo> listener); @Override Host addOnUpdateProcessingListener(final EventListener<HostUpdatesVmsProcessingEventInfo> listener); @Override long getAvailableStorage(); @Override int getWorkingPesNumber(); @Override int getFailedPesNumber(); @Override Simulation getSimulation(); @Override double getLastBusyTime(); @Override final Host setSimulation(final Simulation simulation); @Override int compareTo(final Host o); @Override boolean equals(final Object o); @Override int hashCode(); @Override List<ResourceManageable> getResources(); @Override ResourceProvisioner getProvisioner(final Class<? extends ResourceManageable> resourceClass); @Override List<Pe> getWorkingPeList(); @Override List<Pe> getBusyPeList(); @Override List<Pe> getFreePeList(); @Override double getCpuPercentUtilization(); @Override double getCpuMipsUtilization(); @Override long getRamUtilization(); @Override long getBwUtilization(); @Override SortedMap<Double, DoubleSummaryStatistics> getUtilizationHistory(); @Override SortedMap<Double, Double> getUtilizationHistorySum(); @Override PowerModel getPowerModel(); @Override Host setPowerModel(final PowerModel powerModel); @Override double getPreviousUtilizationOfCpu(); @Override void enableStateHistory(); @Override void disableStateHistory(); @Override boolean isStateHistoryEnabled(); @Override List<Vm> getFinishedVms(); @Override List<HostStateHistoryEntry> getStateHistory(); @Override List<Vm> getMigratableVms();  }
@Test public void testRemoveMigratingInVm() { final int numberOfPes = 2; final Host host = createHostSimple(0, numberOfPes); final VmSimple vm = VmTestUtil.createVm(0, HOST_MIPS, numberOfPes, RAM, BW, STORAGE, new CloudletSchedulerTimeShared()); vm.setHost(Host.NULL); host.addMigratingInVm(vm); host.removeMigratingInVm(vm); assertFalse(vm.isInMigration()); assertFalse(host.getVmsMigratingIn().contains(vm)); }