Fixes tests to work with OwinMiddleware abstract class (reverted from commit 84d9f6bcd96a213105daf2199cca1a298be7f5fd)