### Question:
SingleFilePageSwapper implements PageSwapper { @Override public synchronized void close() throws IOException { closed = true; try { closeAndCollectExceptions( 0, null ); } finally { onEviction = null; } } SingleFilePageSwapper( File file, FileSystemAbstraction fs, int filePageSize, PageEvictionCallback onEviction, boolean noChannelStriping ); @Override long read( long filePageId, long bufferAddress, int bufferSize ); @Override long read( long startFilePageId, long[] bufferAddresses, int bufferSize, int arrayOffset, int length ); @Override long write( long filePageId, long bufferAddress ); @Override long write( long startFilePageId, long[] bufferAddresses, int arrayOffset, int length ); @Override void evicted( long filePageId ); @Override File file(); @Override boolean equals( Object o ); @Override int hashCode(); @Override synchronized void close(); @Override synchronized void closeAndDelete(); @Override void force(); @Override long getLastPageId(); @Override void truncate(); @Override String toString();  }### Answer:
@Test void mustDisableStripingIfToldTo() throws IOException { int bytesPerPage = 32; PageSwapperFactory factory = createSwapperFactory(); FileSystemAbstraction fs = mock( FileSystemAbstraction.class ); StoreChannel channel = mock( StoreChannel.class ); when( channel.tryLock() ).thenReturn( mock( FileLock.class ) ); when( fs.create( any( File.class ) ) ).thenReturn( channel ); when( fs.open( any( File.class ), any() ) ).thenReturn( channel ); factory.open( fs, Configuration.EMPTY ); PageSwapper swapper = createSwapper( factory, file, bytesPerPage, NO_CALLBACK, true, true ); try { verify( fs, times( 1 ) ).open( eq( file ), any( OpenMode.class ) ); } finally { swapper.close(); } }