public static TestSuite suite() {
    TestSuite suite = new TestSuite();

    for (ReuseStrategy reuseStrategy : EnumSet.allOf(ReuseStrategy.class)) {
      TestSuite suiteForReuseStrategy = new TestSuite(reuseStrategy.toString());
      Set<List<Integer>> sizeOptions =
          Sets.cartesianProduct(ImmutableList.of(BLOCK_SIZES, CACHE_SIZES));
      for (List<Integer> options : sizeOptions) {
        int blockSize = options.get(0);
        int cacheSize = options.get(1);
        if (cacheSize > 0 && cacheSize < blockSize) {
          // skip cases where the cache size is not -1 (all) or 0 (none) but it is < blockSize,
          // because this is equivalent to a cache size of 0
          continue;
        }

        TestConfiguration state = new TestConfiguration(blockSize, cacheSize, reuseStrategy);
        TestSuite suiteForTest = new TestSuite(state.toString());
        for (Method method : TEST_METHODS) {
          RegularFileTestRunner tester = new RegularFileTestRunner(method.getName(), state);
          suiteForTest.addTest(tester);
        }
        suiteForReuseStrategy.addTest(suiteForTest);
      }
      suite.addTest(suiteForReuseStrategy);
    }

    return suite;
  }
Returns a test suite for testing file methods with a variety of {@code HeapDisk}
configurations.
jimfs/src/test/java/com/google/common/jimfs/RegularFileTest.java