def METHOD_NAME(self):
    if hasattr(queuelib.queue.FifoMemoryQueue, "peek"):
        raise unittest.SkipTest("The queuelib queues do not define peek")
    q = self.queue()
    self.assertEqual(len(q), 0)
    self.assertIsNone(q.pop())
    req1 = Request("http://www.example.com/1")
    req2 = Request("http://www.example.com/2")
    req3 = Request("http://www.example.com/3")
    q.push(req1)
    q.push(req2)
    q.push(req3)
    with self.assertRaises(
        NotImplementedError,
        msg="The underlying queue class does not implement 'peek'",
    ):
        q.peek()
    self.assertEqual(len(q), 3)
    self.assertEqual(q.pop().url, req1.url)
    self.assertEqual(len(q), 2)
    self.assertEqual(q.pop().url, req2.url)
    self.assertEqual(len(q), 1)
    self.assertEqual(q.pop().url, req3.url)
    self.assertEqual(len(q), 0)
    self.assertIsNone(q.pop())
    q.close()