### Question:
LabelScanWriteMonitor implements NativeLabelScanWriter.WriteMonitor { @Override public void close() { try { channel.close(); } catch ( IOException e ) { throw new UncheckedIOException( e ); } } LabelScanWriteMonitor( FileSystemAbstraction fs, DatabaseLayout databaseLayout );   LabelScanWriteMonitor( FileSystemAbstraction fs, DatabaseLayout databaseLayout,
            long rotationThreshold, ByteUnit rotationThresholdUnit,
            long pruneThreshold, TimeUnit pruneThresholdUnit ); @Override void range( long range, int labelId ); @Override void prepareAdd( long txId, int offset ); @Override void prepareRemove( long txId, int offset ); @Override void mergeAdd( LabelScanValue existingValue, LabelScanValue newValue ); @Override void mergeRemove( LabelScanValue existingValue, LabelScanValue newValue ); @Override void flushPendingUpdates(); @Override void writeSessionEnded(); @Override void force(); @Override void close(); static void main( String[] args ); static void dump( FileSystemAbstraction fs, DatabaseLayout databaseLayout, Dumper dumper, TxFilter txFilter );  }### Answer:
@Test public void shouldRotateExistingFileOnOpen() { LabelScanWriteMonitor writeMonitor = new LabelScanWriteMonitor( fs, directory.databaseLayout() ); writeMonitor.close(); LabelScanWriteMonitor secondWriteMonitor = new LabelScanWriteMonitor( fs, directory.databaseLayout() ); secondWriteMonitor.close(); assertEquals( 2, directory.databaseDir().listFiles( ( dir, name ) -> name.startsWith( baseName ) ).length ); }