middleware mockup