public ConnectorType connectorType(Map<String, String> connConfig) {
        if (connConfig == null) {
            return ConnectorType.UNKNOWN;
        }
        String connClass = connConfig.get(ConnectorConfig.CONNECTOR_CLASS_CONFIG);
        if (connClass == null) {
            return ConnectorType.UNKNOWN;
        }
        try {
            return ConnectorType.from(getConnector(connClass).getClass());
        } catch (ConnectException e) {
            log.warn("Unable to retrieve connector type", e);
            return ConnectorType.UNKNOWN;
        }
    }
@Test
    public void testGetConnectorTypeWithMissingPlugin() {
        String connName = "AnotherPlugin";
        AbstractHerder herder = testHerder();
        when(worker.getPlugins()).thenReturn(plugins);
        when(plugins.newConnector(anyString())).thenThrow(new ConnectException("No class found"));
        assertEquals(ConnectorType.UNKNOWN, herder.connectorType(Collections.singletonMap(ConnectorConfig.CONNECTOR_CLASS_CONFIG, connName)));
    }