    @Test
    public void testTelegramStyleMessagesPattern() {

        MessageExtractor extractor = new GroupSummaryMessageExtractor(true);

        assertTitleAndTextEqual("Alice", null,
                getTitleAndText(extractor, REGULAR, "Alice", "Hello there!"));

        assertTitleAndTextEqual("Alice", "Hello there!",
                getTitleAndText(extractor, SUMMARY, "Alice", "Hello there!"));

        // 2nd message arrived
        assertTitleAndTextEqual("Alice", null,
                getTitleAndText(extractor, REGULAR, "Alice", "Hello there! How are you doing?"));

        assertTitleAndTextEqual("Alice", "How are you doing?",
                getTitleAndText(extractor, SUMMARY, "Alice", "2 new messages",
                        "How are you doing?", "Hello there!"));

        // 3rd message arrived
        assertTitleAndTextEqual("Alice", null,
                getTitleAndText(extractor, REGULAR, "Alice", "Hello there! How are you doing? Let's meet."));

        assertTitleAndTextEqual("Alice", "Let's meet",
                getTitleAndText(extractor, SUMMARY, "Alice", "3 new messages",
                        "Let's meet", "How are you doing?", "Hello there!"));

        // 4th & 5th message arrived together to another chat
        assertTitleAndTextEqual("Bob", null,
                getTitleAndText(extractor, REGULAR, "Bob", "Hi! Check this video http://..."));

        assertTitleAndTextEqual("Bob", "Hi! Check this video http://...",
                getTitleAndText(extractor, SUMMARY, "Telegram", "5 new messages from 2 chats",
                        "Bob: Check this video http://...", "Bob: Hi!",
                        "Alice: Let's meet", "Alice: How are you doing?", "Alice: Hello there!"));

        // three more messages arrived to multiple chats
        assertTitleAndTextEqual("Bob", null,
                getTitleAndText(extractor, REGULAR, "Bob", "Hi! Check this video http://... It's hilarious!"));

        assertTitleAndTextEqual("Alice", null,
                getTitleAndText(extractor, REGULAR, "Alice", "Hello there! How are you doing? Let's meet. Starbucks? How about at 5?"));

        assertTitleAndTextEqual("Telegram", "Alice: Starbucks? How about at 5?; Bob: It's hilarious!",
                getTitleAndText(extractor, SUMMARY, "Telegram", "8 new messages from 2 chats",
                        "Alice: How about at 5?", "Bob: It's hilarious!", "Alice: Starbucks?",
                        "Bob: Check this video http://...", "Bob: Hi!",
                        "Alice: Let's meet", "Alice: How are you doing?", "Alice: Hello there!"));
    }