@Test
    public void shouldNotStoreEmptyChatMessagesWithOnlyChatStatesAndThread() {
        Message message = new Message();
        message.setType(Message.Type.chat);
        message.setThread("1234");
        PacketExtension chatState = new PacketExtension("composing", "http://jabber.org/protocol/chatstates");
        message.addExtension(chatState);
        assertFalse(OfflineMessageStore.shouldStoreMessage(message));
    }
This tests the business rules for storing messages as described in <a href="http://xmpp.org/extensions/xep-0160.html#types">3. Handling of Message Types</a>.

@author csh
xmppserver/src/test/java/org/jivesoftware/openfire/OfflineMessageStoreTest.java