Some middleware tests