public Connector newConnector(String connectorClassOrAlias) {
        Class<? extends Connector> klass = connectorClass(connectorClassOrAlias);
        return newPlugin(klass);
    }
@Test
    public void newConnectorShouldInstantiateWithPluginClassLoader() {
        Connector plugin = plugins.newConnector(TestPlugin.SAMPLING_CONNECTOR.className());

        assertInstanceOf(SamplingTestPlugin.class, plugin, "Cannot collect samples");
        Map<String, SamplingTestPlugin> samples = ((SamplingTestPlugin) plugin).flatten();
        assertTrue(samples.containsKey("<init>")); // constructor was called
        assertPluginClassLoaderAlwaysActive(plugin);
    }