middleware initialization tests