.addColumns(ColumnsDef.create().add("family", "qual0"))
.addColumns(ColumnsDef.create().withMaxVersions(2).add("family", "qual1"))
.addColumns(ColumnsDef.create().withMaxVersions(3).add("family", "qual2"))
.build();
final KijiRowData row1 = mReader.get(mEntityId, dataRequest);
// This should be "middle" based on the time range of the data request.
final String qual0val = row1.getMostRecentValue("family", "qual0").toString();
assertEquals("Didn't get the middle value for family:qual0", "middle", qual0val);
// We always optimize maxVersions=1 to actually return exactly 1 value, even of
// we requested more versions of other columns.
final NavigableMap<Long, CharSequence> q0vals = row1.getValues("family", "qual0");
assertEquals("qual0 should only return one thing", 1, q0vals.size());
assertEquals("Newest (only) value in q0 should be 'middle'.",
"middle", q0vals.firstEntry().getValue().toString());
// qual1 should see at least two versions, but no newer than 7L.
final NavigableMap<Long, CharSequence> q1vals = row1.getValues("family", "qual1");
assertEquals("qual1 getValues should have exactly two items", 2, q1vals.size());
assertEquals("Newest value in q1 should be 'four'.",
"four", q1vals.firstEntry().getValue().toString());
// qual2 should see exactly three versions.
final NavigableMap<Long, CharSequence> q2vals = row1.getValues("family", "qual2");
assertEquals("qual2 getValues should have exactly three items", 3, q2vals.size());
assertEquals("Newest value in q2 should be 'q2-six'.",
"q2-six", q2vals.firstEntry().getValue().toString());
}