Migrate tests to use the assert context pattern