code: public void restoreAllMockEc2Instances(final Collection<AbstractMockEc2Instance> instances) {
          allMockEc2Instances.clear();
          if (null != instances) {
              for (AbstractMockEc2Instance instance : instances) {
                  allMockEc2Instances.put(instance.getInstanceID(), instance);
                  // re-initialize the internal timer
                  instance.initializeInternalTimer();
              }
          }
      }
docs: Clear {@link #allMockEc2Instances} and restore it from given a collection of instances.
  
  @param instances
  collection of {@link #getMockEc2Instance(String)} to restore