MemoryQueryResultRow { public void setCell(final int columnIndex, final Object value) { Preconditions.checkArgument(columnIndex > 0 && columnIndex < data.length + 1); data[columnIndex - 1] = value; } MemoryQueryResultRow(final QueryResult queryResult); Object getCell(final int columnIndex); void setCell(final int columnIndex, final Object value);  }
@Test(expected = IllegalArgumentException.class) public void assertSetCellWithNegativeColumnIndex() { memoryResultSetRow.setCell(-1, "new"); }
@Test(expected = IllegalArgumentException.class) public void assertSetCellWithColumnIndexOutOfRange() { memoryResultSetRow.setCell(2, "new"); }