### Question:
OGR extends FileVectorDriver<OGRWorkspace> implements Disposable { public static OGRWorkspace open(Path path) throws IOException { return new OGR().open(path.toFile(), null); } OGR();  OGR(org.gdal.ogr.Driver ogrDrv); static void init(); static OGRWorkspace open(Path path); @Override boolean isEnabled(Messages messages); @Override void close(); @Override String name(); @Override Class<OGRWorkspace> type(); @Override List<Key<?>> keys(); @Override String family(); @Override boolean canOpen(Map<?, Object> opts, Messages msgs); @Override Set<Capability> capabilities(); static final Key<String> DRIVER; }### Answer:
@Test public void testDriverOpen() throws Exception { assertTrue(OGRDataset.class.isInstance(Drivers.open(data))); }
@Test public void testCursor() throws Exception { int count = 0; OGRDataset dataset = Shapefile.open(data.toPath()); FeatureCursor cursor = dataset.read(new VectorQuery()); while(cursor.hasNext()) { cursor.next(); cursor.hasNext(); count++; } assertEquals(49, count); assertNull(cursor.next()); assertFalse(cursor.hasNext()); cursor = dataset.read(new VectorQuery()); for(int i=0; i<count; i++) { Feature f = cursor.next(); assertNotNull(f); } assertNull(cursor.next()); }