### Question:
HBaseIndexingOptions { @VisibleForTesting void evaluateOutputDir() { if (isDirectWrite() || isDryRun) { if (outputDir != null) { throw new IllegalStateException( "--output-dir must not be specified if --reducers is 0 or --dry-run is enabled"); } if (zkHost == null && (hbaseIndexerName == null || hbaseIndexerZkHost == null)) { throw new IllegalStateException( "--zk-host must be specified if --reducers is 0 or --dry-run is enabled"); } return; } if (goLive) { if (outputDir == null) { outputDir = new Path(conf.get("hbase.search.mr.tmpdir", "/tmp"), "search-" + UUID.randomUUID().toString()); generatedOutputDir = true; } } else { if (outputDir == null) { throw new IllegalStateException("Must supply --output-dir unless --go-live is enabled"); } } } HBaseIndexingOptions(Configuration conf); boolean isDirectWrite(); List<Scan> getScans(); IndexingSpecification getIndexingSpecification(); void evaluate(); boolean isGeneratedOutputDir();  }### Answer:
@Test(expected=IllegalStateException.class) public void testEvaluateOutputDir_DirectWrite_NoSolrZkHostDefined() { opts.outputDir = null; opts.reducers = 0; opts.zkHost = null; opts.evaluateOutputDir(); }
@Test(expected=IllegalStateException.class) public void testEvaluateOutputDir_NoOutputDirButNotDirectWriteMode() { opts.outputDir = null; opts.reducers = 1; opts.evaluateOutputDir(); }
@Test(expected=IllegalStateException.class) public void testEvaluateOutputDir_OutputDirSetAlongWithDirectWriteMode() { opts.outputDir = new Path("/some/path"); opts.reducers = 0; opts.evaluateOutputDir(); }