def METHOD_NAME(self):
    with session.begin():
        # Create a queued job that was submitted a long time ago
        recipe = data_setup.create_recipe()
        job = data_setup.create_job_for_recipes([recipe])
        job.owner = self.user
        data_setup.mark_job_queued(job)
        job.recipesets[0].queue_time = datetime.utcnow() - timedelta(days=self.delayed_job_age)
        # create a job with two recipes, one Queued and one Scheduled
        # which was submitted a long time ago
        queued_recipe = data_setup.create_recipe()
        scheduled_recipe = data_setup.create_recipe()
        job_with_multiple_recipes = data_setup.create_job_for_recipes([queued_recipe, scheduled_recipe])
        job_with_multiple_recipes.owner = self.user
        # mark recipe Queued
        queued_recipe.process()
        queued_recipe.queue()
        # mark recipe Scheduled
        scheduled_recipe.process()
        scheduled_recipe.queue()
        scheduled_recipe.schedule()
        data_setup.mark_job_queued(job_with_multiple_recipes)
        job_with_multiple_recipes.recipesets[0].queue_time = datetime.utcnow()\
            - timedelta(days=self.delayed_job_age)
        # create a new submmited job for just now
        recently_submmited_job = data_setup.create_job_for_recipes([recipe])
        recently_submmited_job.owner = self.user
        data_setup.mark_job_queued(recently_submmited_job)
    beaker_usage = BeakerUsage(self.user, self.reservation_expiry, self.reservation_length,
                           self.waiting_recipe_age, self.delayed_job_age)
    delayed_jobs = beaker_usage.delayed_jobs()
    self.assertEqual(len(delayed_jobs), 2)
    self.assertEqual(absolute_url('/jobs/%s' % job.id), delayed_jobs[0][1])
    self.assertEqual(absolute_url('/jobs/%s' % job_with_multiple_recipes.id), delayed_jobs[1][1])