SesameDataSource implements DataSource { @Override public synchronized void close() throws OntoDriverException { if (!open) { return; } try { if (connected) { driver.close(); } } finally { this.open = false; } }  @Override synchronized void close(); @Override boolean isOpen(); @Override synchronized Connection getConnection(); @Override void setStorageProperties(OntologyStorageProperties storageProperties); @Override void setProperties(Map<String, String> properties); synchronized void setRepository(Repository repository);  }
@Test public void testClose() throws Exception { assertTrue(dataSource.isOpen()); dataSource.close(); assertFalse(dataSource.isOpen()); dataSource.close(); assertFalse(dataSource.isOpen()); }