### Question:
IndexProcedures implements AutoCloseable { @Override public void close() { statement.close(); } IndexProcedures( KernelTransaction tx, IndexingService indexingService ); void awaitIndexByPattern( String indexPattern, long timeout, TimeUnit timeoutUnits ); void awaitIndexByName( String indexName, long timeout, TimeUnit timeoutUnits ); void resampleIndex( String indexSpecification ); void resampleOutdatedIndexes(); Stream<BuiltInProcedures.SchemaIndexInfo> createIndex( String indexSpecification, String providerName ); Stream<BuiltInProcedures.SchemaIndexInfo> createUniquePropertyConstraint( String indexSpecification, String providerName ); Stream<BuiltInProcedures.SchemaIndexInfo> createNodeKey( String indexSpecification, String providerName ); @Override void close();  }### Answer:
@Test public void closeStatementOnClose() { KernelTransaction kernelTransaction = mock( KernelTransaction.class ); Statement statement = mock( Statement.class ); when( kernelTransaction.acquireStatement() ).thenReturn( statement ); try ( IndexProcedures ignored = new IndexProcedures( kernelTransaction, null ) ) { } verify( statement ).close(); }