SesameAdapter implements Closeable, Wrapper { @Override public void close() throws OntoDriverException { if (!open) { return; } try { connector.close(); } finally { this.open = false; } } SesameAdapter(Connector connector, DriverConfiguration configuration); @Override void close(); @Override boolean isOpen(); @Override T unwrap(Class<T> cls);  }
@Test void testClose() throws Exception { assertTrue(adapter.isOpen()); adapter.close(); verify(connectorMock).close(); assertFalse(adapter.isOpen()); }