this test seems odd to me. in the test you should know the exact sequence number (and you should be testing it in the test, not in the production code).