     
     public init(withRooms rooms: [MockRoomSummary]) {
         self.rooms = rooms
+        
+        var invited: [MockRoomSummary] = []
+        var favorited: [MockRoomSummary] = []
+        var people: [MockRoomSummary] = []
+        var conversation: [MockRoomSummary] = []
+        var lowPriority: [MockRoomSummary] = []
+        var serverNotice: [MockRoomSummary] = []
+        
+        rooms.forEach { summary in
+            if summary.isTyped(.invited) {
+                invited.append(summary)
+            }
+            if summary.isTyped(.favorited) {
+                favorited.append(summary)
+            }
+            if summary.isTyped(.direct) {
+                people.append( summary)
+            }
+            if !summary.isTyped([.direct,
+                                .invited,
+                                .favorited,
+                                .lowPriority,
+                                .serverNotice]) {
+                conversation.append(summary)
+            }
+            if summary.isTyped(.lowPriority) {
+                lowPriority.append(summary)
+            }
+            if summary.isTyped(.serverNotice) {
+                serverNotice.append(summary)
+            }
+        }
+        _invitedRoomListData = MockRoomListData(withRooms: invited)
+        _favoritedRoomListData = MockRoomListData(withRooms: favorited)
+        _peopleRoomListData = MockRoomListData(withRooms: people)
+        _conversationRoomListData = MockRoomListData(withRooms: conversation)
+        _lowPriorityRoomListData = MockRoomListData(withRooms: lowPriority)
+        _serverNoticeRoomListData = MockRoomListData(withRooms: serverNotice)
+        
         super.init()
     }
     


@objcMembers
public class MockRecentsListService: NSObject, RecentsListServiceProtocol {
    private var rooms: [MockRoomSummary] = []
    
    // swiftlint:disable weak_delegate
    private let multicastDelegate: MXMulticastDelegate<RecentsListServiceDelegate> = MXMulticastDelegate()

    }
    
    public func stop() {
        _invitedRoomListData = nil
        _favoritedRoomListData = nil
        _peopleRoomListData = nil
        _conversationRoomListData = nil
        _lowPriorityRoomListData = nil
        _serverNoticeRoomListData = nil
        removeAllDelegates()
    }
    
