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