@Test public void closesConnection() throws Exception { RepositoryConnection connection = mock(RepositoryConnection.class); CloseableRepositoryConnection closeableRepositoryConnection = new CloseableRepositoryConnection(connection); closeableRepositoryConnection.close(); verify(connection).close(); }
@Override public void close() throws RepositoryException { connection.close(); }
CloseableRepositoryConnection implements AutoCloseable { @Override public void close() throws RepositoryException { connection.close(); } }
CloseableRepositoryConnection implements AutoCloseable { @Override public void close() throws RepositoryException { connection.close(); } CloseableRepositoryConnection(RepositoryConnection connection); }
CloseableRepositoryConnection implements AutoCloseable { @Override public void close() throws RepositoryException { connection.close(); } CloseableRepositoryConnection(RepositoryConnection connection); RepositoryConnection get(); @Override void close(); void closeQuietly(); }
CloseableRepositoryConnection implements AutoCloseable { @Override public void close() throws RepositoryException { connection.close(); } CloseableRepositoryConnection(RepositoryConnection connection); RepositoryConnection get(); @Override void close(); void closeQuietly();  }