public <T> List<T> newPlugins(List<String> klassNames, AbstractConfig config, Class<T> pluginKlass) {
        List<T> plugins = new ArrayList<>();
        if (klassNames != null) {
            for (String klassName : klassNames) {
                plugins.add(newPlugin(klassName, config, pluginKlass));
            }
        }
        return plugins;
    }
@Test
    public void shouldInstantiateAndConfigureConnectRestExtension() {
        props.clear();
        props.put(RestServerConfig.REST_EXTENSION_CLASSES_CONFIG,
                  TestConnectRestExtension.class.getName());
        config = RestServerConfig.forPublic(null, props);

        List<ConnectRestExtension> connectRestExtensions =
            plugins.newPlugins(config.getList(RestServerConfig.REST_EXTENSION_CLASSES_CONFIG),
                               config,
                               ConnectRestExtension.class);
        assertNotNull(connectRestExtensions);
        assertEquals(1, connectRestExtensions.size(), "One Rest Extension expected");
        assertNotNull(connectRestExtensions.get(0));
        assertTrue(connectRestExtensions.get(0) instanceof TestConnectRestExtension,
            "Should be instance of TestConnectRestExtension");
        assertNotNull(((TestConnectRestExtension) connectRestExtensions.get(0)).configs);
        assertEquals(config.originals(),
                     ((TestConnectRestExtension) connectRestExtensions.get(0)).configs);
    }