Exemplo n.º 1
0
    protected void runTest() throws Throwable {
      add(new HashMap());
      add(new Hashtable());

      for (Iterator i = clearables.iterator(); i.hasNext(); ) {
        Clearable c = (Clearable) i.next();

        // At the time this test was written, all Clearable types should have eviction enabled by
        // default
        // (ie. one should not need to manually enable eviction)
        if (!c.isEvictionEnabled()) {
          throw new RuntimeException(c.getClass() + " does not have eviction enabled");
        }

        populate(c);
        clear(c);
        validateCleared(c);
      }
    }