Add a test that checks the order of captured values.