### Question:
FileSystemClosingBatchInserter implements BatchInserter, IndexConfigStoreProvider { @Override public void shutdown() { delegate.shutdown(); closeFileSystem(); } FileSystemClosingBatchInserter( BatchInserter delegate, IndexConfigStoreProvider configStoreProvider,
            FileSystemAbstraction fileSystem ); @Override long createNode( Map<String,Object> properties, Label... labels ); @Override void createNode( long id, Map<String,Object> properties, Label... labels ); @Override boolean nodeExists( long nodeId ); @Override void setNodeProperties( long node, Map<String,Object> properties ); @Override boolean nodeHasProperty( long node, String propertyName ); @Override void setNodeLabels( long node, Label... labels ); @Override Iterable<Label> getNodeLabels( long node ); @Override boolean nodeHasLabel( long node, Label label ); @Override boolean relationshipHasProperty( long relationship, String propertyName ); @Override void setNodeProperty( long node, String propertyName, Object propertyValue ); @Override void setRelationshipProperty( long relationship, String propertyName, Object propertyValue ); @Override Map<String,Object> getNodeProperties( long nodeId ); @Override Iterable<Long> getRelationshipIds( long nodeId ); @Override Iterable<BatchRelationship> getRelationships( long nodeId ); @Override long createRelationship( long node1, long node2, RelationshipType type, Map<String,Object> properties ); @Override BatchRelationship getRelationshipById( long relId ); @Override void setRelationshipProperties( long rel, Map<String,Object> properties ); @Override Map<String,Object> getRelationshipProperties( long relId ); @Override void removeNodeProperty( long node, String property ); @Override void removeRelationshipProperty( long relationship, String property ); @Override IndexCreator createDeferredSchemaIndex( Label label ); @Override ConstraintCreator createDeferredConstraint( Label label ); @Override void shutdown(); @Override String getStoreDir(); @Override IndexConfigStore getIndexStore();  }### Answer:
@Test public void closeFileSystemOnShutdown() throws Exception { BatchInserter batchInserter = mock( BatchInserter.class ); IndexConfigStoreProvider configStoreProvider = mock( IndexConfigStoreProvider.class ); FileSystemAbstraction fileSystem = mock( FileSystemAbstraction.class ); FileSystemClosingBatchInserter inserter = new FileSystemClosingBatchInserter( batchInserter, configStoreProvider, fileSystem ); inserter.shutdown(); InOrder verificationOrder = inOrder( batchInserter, fileSystem ); verificationOrder.verify( batchInserter ).shutdown(); verificationOrder.verify( fileSystem ).close(); }