### Question:
Reader implements Closeable { @Override public void close() throws IOException { storeChannel.close(); } Reader( FileSystemAbstraction fsa, File file, long version ); long version(); StoreChannel channel(); @Override void close();  }### Answer:
@Test public void shouldCloseChannelOnClose() throws Exception { when( fsa.open( file, OpenMode.READ ) ).thenReturn( channel ); Reader reader = new Reader( fsa, file, 0 ); reader.close(); verify( channel ).close(); }