Assert on middleware prepend, append and inject.