@Test
    public void testChatPrivate() throws Exception
    {
        // Setup test fixture.
        final Message input = new Message();
        input.setType(Message.Type.chat);
        input.getElement().addElement("private", "urn:xmpp:carbons:2");

        // Execute system under test.
        final boolean result = Forwarded.isEligibleForCarbonsDelivery(input);

        // Verify results.
        assertFalse(result);
    }
Asserts that a message of type 'chat' but with a 'private' extension is not eligible for Carbons delivery.
xmppserver/src/test/java/org/jivesoftware/openfire/forward/ForwardedTest.java