private static void validateParsedOpts(TestOptions opts) {

    if (!opts.autoFlush && opts.multiPut > 0) {
      throw new IllegalArgumentException("autoFlush must be true when multiPut is more than 0");
    }

    if (opts.oneCon && opts.connCount > 1) {
      throw new IllegalArgumentException(
        "oneCon is set to true, " + "connCount should not bigger than 1");
    }

    if (opts.valueZipf && opts.valueRandom) {
      throw new IllegalStateException("Either valueZipf or valueRandom but not both");
    }
  }
Validates opts after all the opts are parsed, so that caller need not to maintain order of opts
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/PerformanceEvaluation.java