public static Map<String, String> validate(Map<String, String> configs) {
        Map<String, String> invalidConfigs = new HashMap<>();

        // No point to validate when connector is disabled.
        if ("false".equals(configs.getOrDefault(ENABLED, "true"))) {
            return invalidConfigs;
        }

        if ("false".equals(configs.get(EMIT_CHECKPOINTS_ENABLED))) {
            invalidConfigs.putIfAbsent(EMIT_CHECKPOINTS_ENABLED, "MirrorCheckpointConnector can't run with " +
                    EMIT_CHECKPOINTS_ENABLED + " set to false");
        }

        if ("false".equals(configs.get(EMIT_OFFSET_SYNCS_ENABLED))) {
            invalidConfigs.putIfAbsent(EMIT_OFFSET_SYNCS_ENABLED, "MirrorCheckpointConnector can't run without offset syncs");
        }

        return invalidConfigs;
    }
@Test
    public void testValidateIfConnectorEnabled() {
        Map<String, String> configValues = MirrorCheckpointConfig.validate(makeProps(
                MirrorCheckpointConfig.EMIT_CHECKPOINTS_ENABLED, "false",
                MirrorCheckpointConfig.SYNC_GROUP_OFFSETS_ENABLED, "false"));
        assertEquals(configValues.keySet(), Collections.singleton(MirrorCheckpointConfig.EMIT_CHECKPOINTS_ENABLED));

        configValues = MirrorCheckpointConfig.validate(makeProps(MirrorCheckpointConfig.EMIT_CHECKPOINTS_ENABLED, "true",
                MirrorCheckpointConfig.EMIT_OFFSET_SYNCS_ENABLED, "false"));
        assertEquals(configValues.keySet(), Utils.mkSet(MirrorCheckpointConfig.EMIT_OFFSET_SYNCS_ENABLED));

        configValues = MirrorCheckpointConfig.validate(makeProps(MirrorCheckpointConfig.EMIT_CHECKPOINTS_ENABLED, "true",
                MirrorCheckpointConfig.EMIT_CHECKPOINTS_ENABLED, "true",
                MirrorCheckpointConfig.EMIT_OFFSET_SYNCS_ENABLED, "true"));
        assertTrue(configValues.isEmpty());
    }