### Question:
HBaseIndexingOptions { @VisibleForTesting void evaluateGoLiveArgs() { if (goLive && zkHost == null && solrHomeDir == null) { throw new IllegalStateException("--go-live requires at least one of --zk-host or --solr-home-dir"); } if (goLive && zkHost == null && shardUrls == null) { throw new IllegalStateException("--go-live requires that you also pass --shard-url or --zk-host"); } if (zkHost != null && collection == null) { throw new IllegalStateException("--zk-host requires that you also pass --collection"); } if (zkHost != null) { return; } else if (shardUrls != null) { if (shardUrls.size() == 0) { throw new IllegalStateException("--shard-url requires at least one URL"); } } else if (shards != null) { if (shards <= 0) { throw new IllegalStateException("--shards must be a positive number: " + shards); } } else { throw new IllegalStateException("You must specify one of the following (mutually exclusive) arguments: " + "--zk-host or --shard-url or --shards"); } if (shardUrls != null) { shards = shardUrls.size(); } } HBaseIndexingOptions(Configuration conf); boolean isDirectWrite(); List<Scan> getScans(); IndexingSpecification getIndexingSpecification(); void evaluate(); boolean isGeneratedOutputDir();  }### Answer:
@Test(expected=IllegalStateException.class) public void testEvaluateGoLiveArgs_NoZkHostOrSolrHomeDir() { opts.solrHomeDir = null; opts.zkHost = null; opts.evaluateGoLiveArgs(); }
@Test(expected=IllegalStateException.class) public void testEvaluateGoLiveArgs_GoLiveButNoZkAndNoShards() { opts.goLive = true; opts.zkHost = null; opts.shardUrls = null; opts.evaluateGoLiveArgs(); }
@Test(expected=IllegalStateException.class) public void testEvaluateGoLiveArgs_ZkHostButNoCollection() { opts.zkHost = "myzkhost"; opts.collection = null; opts.evaluateGoLiveArgs(); }
@Test(expected=IllegalStateException.class) public void testEvaluateGoLiveArgs_EmptyShardUrls() { opts.solrHomeDir = new File("/solrhome"); opts.shardUrls = ImmutableList.of(); opts.evaluateGoLiveArgs(); }
@Test(expected=IllegalStateException.class) public void testEvaluateGoLiveArgs_ZeroShards() { opts.solrHomeDir = new File("/solrhome"); opts.shards = 0; opts.evaluateGoLiveArgs(); }
@Test public void testEvaluateGoLiveArgs_AutoSetShardCount() { opts.solrHomeDir = new File("/solrhome"); opts.shardUrls = ImmutableList.<List<String>>of(ImmutableList.of("shard_a"), ImmutableList.of("shard_b")); opts.shards = null; opts.evaluateGoLiveArgs(); assertEquals(2, (int)opts.shards); }