private static final Logger LOG = LoggerFactory.getLogger(TestScanTool.class);
@Test
public void testUnderspecified() throws Exception {
final Kiji kiji = getKiji();
final KijiURI hbaseURI = KijiURI.newBuilder(kiji.getURI()).withInstanceName(null).build();
assertEquals(BaseTool.FAILURE, runTool(new ScanTool(), hbaseURI.toString()));
assertTrue(mToolOutputLines[0].startsWith("Specify a cluster"));
assertEquals(BaseTool.FAILURE, runTool(new ScanTool()));
assertTrue(mToolOutputLines[0].startsWith("URI must be specified"));
assertEquals(BaseTool.FAILURE, runTool(new ScanTool(), hbaseURI.toString(), "--max-rows=-1"));
assertTrue(mToolOutputLines[0].startsWith("--max-rows must be nonnegative"));
assertEquals(BaseTool.FAILURE, runTool(new ScanTool(),
hbaseURI.toString(),
"--max-versions=0"));
assertTrue(mToolOutputLines[0].startsWith("--max-versions must be positive"));
assertEquals(BaseTool.FAILURE, runTool(new ScanTool(),
hbaseURI.toString() + "instance/table",
"--timestamp="));
assertTrue(mToolOutputLines[0].startsWith("--timestamp"));
}