@Override
    public synchronized void removeConnectorConfig(String connector) {
        ConnectorState state = connectors.remove(connector);

        if (updateListener != null && state != null)
            updateListener.onConnectorConfigRemove(connector);
    }
@Test
    public void testRemoveConnectorConfig() {
        configStore.putConnectorConfig(CONNECTOR_IDS.get(0), SAMPLE_CONFIGS.get(0), null);
        configStore.putConnectorConfig(CONNECTOR_IDS.get(1), SAMPLE_CONFIGS.get(1), null);
        ClusterConfigState configState = configStore.snapshot();

        Set<String> expectedConnectors = new HashSet<>();
        expectedConnectors.add(CONNECTOR_IDS.get(0));
        expectedConnectors.add(CONNECTOR_IDS.get(1));
        assertEquals(expectedConnectors, configState.connectors());

        configStore.removeConnectorConfig(CONNECTOR_IDS.get(1));
        configState = configStore.snapshot();

        assertFalse(configState.contains(CONNECTOR_IDS.get(1)));
        assertEquals(1, configState.connectors().size());

        verify(configUpdateListener).onConnectorConfigUpdate(eq(CONNECTOR_IDS.get(0)));
        verify(configUpdateListener).onConnectorConfigUpdate(eq(CONNECTOR_IDS.get(1)));
        verify(configUpdateListener).onConnectorConfigRemove(eq(CONNECTOR_IDS.get(1)));
    }