Added implementation and test of [MXMemoryStore lastMessageWithTypeIn:]