Source:
public void testValidInput() { ScannerConfiguration config; config = parseArgs(""); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getStart()); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getEnd()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-s start -e end -c col1,col2"); Assert.assertEquals(new RowColumn("start"), config.getSpan().getStart()); Assert.assertEquals(new RowColumn("end").following(), config.getSpan().getEnd()); Assert.assertEquals(2, config.getColumns().size()); Assert.assertEquals(new Column("col1"), config.getColumns().get(0)); Assert.assertEquals(new Column("col2"), config.getColumns().get(1)); config = parseArgs("-s start -c cf:cq"); Assert.assertEquals(new RowColumn("start"), config.getSpan().getStart()); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getEnd()); Assert.assertEquals(1, config.getColumns().size()); Assert.assertEquals(new Column("cf", "cq"), config.getColumns().get(0)); config = parseArgs("-e end"); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getStart()); Assert.assertEquals(new RowColumn("end").following(), config.getSpan().getEnd()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-p myprefix"); Assert.assertEquals(Span.prefix("myprefix"), config.getSpan()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-r exactRow"); Assert.assertEquals(Span.exact("exactRow"), config.getSpan()); Assert.assertEquals(0, config.getColumns().size()); }

Target:
public void testValidInput() { ScannerConfiguration config; config = parseArgs(""); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getStart()); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getEnd()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-s start -e end -c col1,col2"); Assert.assertEquals(new RowColumn("start"), config.getSpan().getStart()); Assert.assertEquals(new RowColumn("end").following(), config.getSpan().getEnd()); Assert.assertEquals(2, config.getColumns().size()); Assert.assertEquals(new Column("col1"), config.getColumns().get(0)); Assert.assertEquals(new Column("col2"), config.getColumns().get(1)); config = parseArgs("-s start -c cf:cq"); Assert.assertEquals(new RowColumn("start"), config.getSpan().getStart()); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getEnd()); Assert.assertEquals(1, config.getColumns().size()); Assert.assertEquals(new Column("cf", "cq"), config.getColumns().get(0)); config = parseArgs("-e end"); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getStart()); Assert.assertEquals(new RowColumn("end").following(), config.getSpan().getEnd()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-p myprefix"); Assert.assertEquals(Span.prefix("myprefix"), config.getSpan()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-r exactRow"); Assert.assertEquals(Span.exact("exactRow"), config.getSpan()); Assert.assertEquals(0, config.getColumns().size()); config = parseArgs("-c cf1:cq1,cf2:cq2"); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getStart()); Assert.assertEquals(RowColumn.EMPTY, config.getSpan().getEnd()); Assert.assertEquals(2, config.getColumns().size()); Assert.assertEquals(new Column("cf1", "cq1"), config.getColumns().get(0)); Assert.assertEquals(new Column("cf2", "cq2"), config.getColumns().get(1)); }