public static Map<String, ConnectorConfigField> createConnectorFieldsAsMap(
            final ConfigDef configDef, final Class<?> configClass, final Set<String> requiredFields,
            final Map<String, Object> overriddenDefaultValues) {
        // first we extract deprecated fields
        final Set<String> deprecatedFields = getDeprecatedFieldsFromConfigClass(configClass);

        return createConnectorFieldsAsMap(configDef, deprecatedFields, requiredFields, overriddenDefaultValues);
    }
@Test
    void testIfCreatesFieldsMapWithDeprecatedFields() {
        final ConfigDef configDef = new ConfigDef()
                .define("test.field.1", ConfigDef.Type.STRING, ConfigDef.Importance.MEDIUM, "docs1")
                .define("test.field.2", ConfigDef.Type.CLASS, ConfigDef.Importance.MEDIUM, "docs2")
                .define("test.field.3", ConfigDef.Type.PASSWORD, ConfigDef.Importance.MEDIUM, "doc3")
                .define("test.field.4", ConfigDef.Type.INT, ConfigDef.Importance.MEDIUM, "doc4");

        final Set<String> deprecatedFields = new HashSet<>(Collections.singletonList("test.field.2"));
        final Set<String> requiredFields = new HashSet<>(Collections.singletonList("test.field.1"));
        final Map<String, Object> overridenFields = Collections.singletonMap("test.field.1", "I am overriden");

        final Map<String, ConnectorConfigField> connectorConfigToField
                = ConnectorConfigFieldsFactory.createConnectorFieldsAsMap(
                        configDef, deprecatedFields, requiredFields, overridenFields);

        assertEquals(4, connectorConfigToField.size());

        final ConnectorConfigField connectorConfigField1 = connectorConfigToField.get("test.field.1");

        assertEquals("testField1", connectorConfigField1.getFieldName());
        assertEquals("I am overriden", connectorConfigField1.getDefaultValue());
        assertTrue(connectorConfigField1.isRequired());
        assertFalse(connectorConfigField1.isDeprecated());

        final ConnectorConfigField connectorConfigField2 = connectorConfigToField.get("test.field.2");
        assertFalse(connectorConfigField2.isRequired());
        assertTrue(connectorConfigField2.isDeprecated());
    }