public static void addConfigsToProperties(
        Properties props, Map<String, String> commonConf, Map<String, String> clientConf) {
        for (Map.Entry<String, String> commonEntry : commonConf.entrySet()) {
            props.setProperty(commonEntry.getKey(), commonEntry.getValue());
        }
        for (Map.Entry<String, String> entry : clientConf.entrySet()) {
            props.setProperty(entry.getKey(), entry.getValue());
        }
    }
@Test
    public void testCommonConfigOverwritesDefaultProps() {
        Properties props = new Properties();
        props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
        props.put(ProducerConfig.ACKS_CONFIG, "all");

        Properties resultProps = new Properties();
        resultProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
        resultProps.put(ProducerConfig.ACKS_CONFIG, "1");
        resultProps.put(ProducerConfig.LINGER_MS_CONFIG, "1000");

        WorkerUtils.addConfigsToProperties(
            props,
            Collections.singletonMap(ProducerConfig.ACKS_CONFIG, "1"),
            Collections.singletonMap(ProducerConfig.LINGER_MS_CONFIG, "1000"));
        assertEquals(resultProps, props);
    }