PrepareBackupFactory { PrepareBackup createPrepareBackup(InternalDistributedMember member, InternalCache cache, Properties properties) { String memberId = cleanSpecialCharacters(member.toString()); BackupWriter backupWriter = BackupWriterFactory.getFactoryForType(properties.getProperty(TYPE)) .createWriter(properties, memberId); return new PrepareBackup(member, cache, backupWriter); }    }
@Test public void createPrepareBackupReturnsPrepareBackup() throws Exception { Properties properties = new BackupConfigFactory().withTargetDirPath("targetDir").createBackupProperties(); assertThat(prepareBackupFactory.createPrepareBackup(member, cache, properties)) .isInstanceOf(PrepareBackup.class); }