         XCTAssertFalse(queue.hasPreviousItem)
         XCTAssertNil(try! queue.previousItem())
 
-        _ = try! queue.nextItem()
+        XCTAssertNotNil(try! queue.nextItem())
         XCTAssert(queue.hasNextItem)
         XCTAssert((try! queue.previousItem()) === item1)
     }

    func testHasNextItemInQueue() {
        let queue = AudioItemQueue(items: [item1, item2, item3], mode: [.normal])
        XCTAssert(queue.hasNextItem)
        _ = try! queue.nextItem()
        XCTAssert(queue.hasNextItem)
        _ = try! queue.nextItem()
        XCTAssert(queue.hasNextItem)
        _ = try! queue.nextItem()
        XCTAssertFalse(queue.hasNextItem)

        queue.mode = .repeat
        for _ in 0...100 {
            _ = try! queue.nextItem()
            XCTAssert(queue.hasNextItem)
        }

        queue.mode = .repeatAll
        for _ in 0...100 {
            _ = try! queue.nextItem()
            XCTAssert(queue.hasNextItem)
        }



    func testQueueInNormalModelAfterSwitchingIfFromRepeatMode() {
        let queue = AudioItemQueue(items: [item1, item2, item3], mode: .repeat)
        XCTAssertNotNil(try! queue.nextItem())

        queue.mode = .normal
        XCTAssert((try! queue.nextItem()) === item2)

        let queue2 = AudioItemQueue(items: [item1], mode: .repeat)
        XCTAssertNotNil(try! queue2.nextItem())

        queue2.mode = .normal
        XCTAssert((try! queue2.nextItem()) === nil)
