### Question:
BackupImpl implements TheBackupInterface { @Override public Response<Void> fullBackup( StoreWriter writer, boolean forensics ) { String backupIdentifier = getBackupIdentifier(); try ( StoreWriter storeWriter = writer ) { logger.log( "%s: Full backup started...", backupIdentifier ); RequestContext copyStartContext = storeCopyServer.flushStoresAndStreamStoreFiles( FULL_BACKUP_CHECKPOINT_TRIGGER, storeWriter, forensics ); ResponsePacker responsePacker = new StoreCopyResponsePacker( logicalTransactionStore, transactionIdStore, logFileInformation, storeId, copyStartContext.lastAppliedTransaction() + 1, storeCopyServer.monitor() ); long optionalTransactionId = copyStartContext.lastAppliedTransaction(); return responsePacker.packTransactionStreamResponse( anonymous( optionalTransactionId ), null ); } finally { logger.log( "%s: Full backup finished.", backupIdentifier ); } } BackupImpl( StoreCopyServer storeCopyServer,
                       LogicalTransactionStore logicalTransactionStore, TransactionIdStore transactionIdStore,
                       LogFileInformation logFileInformation, Supplier<StoreId> storeId, LogProvider logProvider ); @Override Response<Void> fullBackup( StoreWriter writer, boolean forensics ); @Override Response<Void> incrementalBackup( RequestContext context );  }### Answer:
@Test public void flushStoreFilesWithCorrectCheckpointTriggerName() { StoreCopyServer storeCopyServer = mock( StoreCopyServer.class ); when( storeCopyServer.flushStoresAndStreamStoreFiles( anyString(), any( StoreWriter.class ), anyBoolean() ) ) .thenReturn( RequestContext.EMPTY ); BackupImpl backup = new BackupImpl( storeCopyServer, mock( LogicalTransactionStore.class ), mock( TransactionIdStore.class ), mock( LogFileInformation.class ), defaultStoreIdSupplier(), NullLogProvider.getInstance() ); backup.fullBackup( mock( StoreWriter.class ), false ).close(); verify( storeCopyServer ).flushStoresAndStreamStoreFiles( eq( BackupImpl.FULL_BACKUP_CHECKPOINT_TRIGGER ), any( StoreWriter.class ), eq( false ) ); }