@Test
public void testMax() throws IllegalArgumentException, NoSuchElementException, IOException {

  final FeatureReader<SimpleFeatureType, SimpleFeature> reader =
      dataStore.getFeatureReader(query, Transaction.AUTO_COMMIT);
  final MaxVisitor visitor = new MaxVisitor("start", type);
  unwrapDelegatingFeatureReader(reader).getFeatureCollection().accepts(visitor, null);
  assertTrue(visitor.getMax().equals(mtime));
}