public void testAddManyPairs() {
   for (int aLow = 0; aLow < 6; aLow++) {
     for (int aHigh = 0; aHigh < 6; aHigh++) {
       for (BoundType aLowType : BoundType.values()) {
         for (BoundType aHighType : BoundType.values()) {
           if ((aLow == aHigh && aLowType == OPEN && aHighType == OPEN) || aLow > aHigh) {
             continue;
           }
           for (int bLow = 0; bLow < 6; bLow++) {
             for (int bHigh = 0; bHigh < 6; bHigh++) {
               for (BoundType bLowType : BoundType.values()) {
                 for (BoundType bHighType : BoundType.values()) {
                   if ((bLow == bHigh && bLowType == OPEN && bHighType == OPEN) || bLow > bHigh) {
                     continue;
                   }
                   doPairTest(
                       range(aLow, aLowType, aHigh, aHighType),
                       range(bLow, bLowType, bHigh, bHighType));
                 }
               }
             }
           }
         }
       }
     }
   }
 }
  static {
    ImmutableList.Builder<Range<Integer>> queryBuilder = ImmutableList.builder();

    queryBuilder.add(Range.<Integer>all());

    for (int i = MIN_BOUND; i <= MAX_BOUND; i++) {
      for (BoundType boundType : BoundType.values()) {
        queryBuilder.add(Range.upTo(i, boundType));
        queryBuilder.add(Range.downTo(i, boundType));
      }
      queryBuilder.add(Range.singleton(i));
      queryBuilder.add(Range.openClosed(i, i));
      queryBuilder.add(Range.closedOpen(i, i));

      for (BoundType lowerBoundType : BoundType.values()) {
        for (int j = i + 1; j <= MAX_BOUND; j++) {
          for (BoundType upperBoundType : BoundType.values()) {
            queryBuilder.add(Range.range(i, lowerBoundType, j, upperBoundType));
          }
        }
      }
    }
    QUERY_RANGES = queryBuilder.build();
  }