public TopicConfig setMultiThreadingEnabled(boolean multiThreadingEnabled) {
        if (this.globalOrderingEnabled && multiThreadingEnabled) {
            throw new IllegalArgumentException("Multi-threading can not be enabled when global ordering is used.");
        }
        this.multiThreadingEnabled = multiThreadingEnabled;
        return this;
    }
@Test
    public void testSetMultiThreadingEnabled() {
        TopicConfig topicConfig = new TopicConfig().setGlobalOrderingEnabled(false);
        topicConfig.setMultiThreadingEnabled(true);
        assertTrue(topicConfig.isMultiThreadingEnabled());
        try {
            topicConfig.setGlobalOrderingEnabled(true);
            assertTrue("global-ordering must be disabled when multi-threading is enabled", false);
        } catch (IllegalArgumentException e) {
            // anticipated..
        }
        assertFalse(topicConfig.isGlobalOrderingEnabled());
    }