@Test
  public void testGetBackupManagerFactories() {
    String factory1 = "factory1";
    String factory2 = "factory2";
    String factory3 = "factory3";
    StorageConfig storageConfig = new StorageConfig(new MapConfig(
        ImmutableMap.of(
            String.format(STORE_BACKUP_FACTORIES, STORE_NAME0), factory1 + "," + factory2,
            String.format(STORE_BACKUP_FACTORIES, STORE_NAME1), factory1,
            String.format(STORE_BACKUP_FACTORIES, STORE_NAME2), factory3,
            // store_name3 should use DEFAULT_STATE_BACKEND_FACTORY due to changelog presence
            String.format(CHANGELOG_STREAM, STORE_NAME3), "nondefault-changelog-system.streamName"),
        ImmutableMap.of(
            String.format(FACTORY, STORE_NAME0), "store0.factory.class",
            String.format(FACTORY, STORE_NAME1), "store1.factory.class",
            String.format(FACTORY, STORE_NAME2), "store2.factory.class",
            String.format(FACTORY, STORE_NAME3), "store3.factory.class",
            // this store should have no backend factory configured
            String.format(FACTORY, "noFactoryStore"), "noFactory.factory.class"
        )
    ));
    Set<String> factories = storageConfig.getBackupFactories();
    assertTrue(factories.contains(factory1));
    assertTrue(factories.contains(factory2));
    assertTrue(factories.contains(factory3));
    assertTrue(factories.contains(KAFKA_STATE_BACKEND_FACTORY));
    assertEquals(4, factories.size());
    assertEquals(ImmutableList.of(factory1, factory2), storageConfig.getStoreBackupFactories(STORE_NAME0));
    assertEquals(ImmutableList.of(factory1), storageConfig.getStoreBackupFactories(STORE_NAME1));
    assertEquals(ImmutableList.of(factory3), storageConfig.getStoreBackupFactories(STORE_NAME2));
    assertEquals(DEFAULT_BACKUP_FACTORIES, storageConfig.getStoreBackupFactories(STORE_NAME3));
    assertTrue(storageConfig.getStoreBackupFactories("emptyStore").isEmpty());
    assertTrue(storageConfig.getStoreBackupFactories("noFactoryStore").isEmpty());
  }
Test verifies that the {@link StorageConfig#STORE_RESTORE_FACTORIES} which matches pattern for store.%s.factory
is not picked up as in store names list
samza-core/src/test/java/org/apache/samza/config/TestStorageConfig.java