code: public void restoreAllMockSubnet(final Collection<MockSubnet> subnets) {
          allMockSubnets.clear();
          if (null != subnets) {
              for (MockSubnet instance : subnets) {
                  allMockSubnets.put(instance.getSubnetId(), instance);
              }
          }
      }
docs: Clear {@link #allMockSubnets} and restore it from given a collection of instances.
  
  @param subnets
  collection of MockSubnet to restore