testClosing :: ([QueueAction Int] -> [Maybe [Int]] -> Assertion) -> [TestTree]
testClosing assertActions =
    

    [ testCase "Two" $ assertActions [
            Enqueue [0],
            Close,
            Enqueue [1]]
            $ expect [Just [0]]

    , testCase "Two with wait" $ assertActions [
            Enqueue [0],
            Wait shortPause,
            Close,
            Enqueue [1]]
            $ expect [Just [0]]
    ]

    where
        expect = id
testClosing :: ([QueueAction Int] -> [Maybe [Int]] -> Assertion) -> [TestTree]
testClosing assertActions =
    

    [ testCase "Two" $ assertActions [
            Enqueue [0],
            Close,
            Enqueue [1]]
            $ expect [Just [0]]

    , testCase "Two with wait" $ assertActions [
            Enqueue [0],
            Wait shortPause,
            Close,
            Enqueue [1]]
            $ expect [Just [0]]
    ]

    where
        expect = id
testClosing assertActions =
    

    [ testCase "Two" $ assertActions [
            Enqueue [0],
            Close,
            Enqueue [1]]
            $ expect [Just [0]]

    , testCase "Two with wait" $ assertActions [
            Enqueue [0],
            Wait shortPause,
            Close,
            Enqueue [1]]
            $ expect [Just [0]]
    ]

    where
        expect = id