Get integration tests working with middleware stack