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