Add a middleware test and a  composite test