public boolean transactionalLeaderEnabled() {
        return exactlyOnceSourceSupport.usesTransactionalLeader;
    }
@Test
    public void shouldIdentifyNeedForTransactionalLeader() {
        Map<String, String> workerProps = configs();

        workerProps.put(EXACTLY_ONCE_SOURCE_SUPPORT_CONFIG, "disabled");
        assertFalse(new DistributedConfig(workerProps).transactionalLeaderEnabled());

        workerProps.put(EXACTLY_ONCE_SOURCE_SUPPORT_CONFIG, "preparing");
        assertTrue(new DistributedConfig(workerProps).transactionalLeaderEnabled());

        workerProps.put(EXACTLY_ONCE_SOURCE_SUPPORT_CONFIG, "enabled");
        assertTrue(new DistributedConfig(workerProps).transactionalLeaderEnabled());
    }