Simplified a test by using CapturedQueriesContext