You need to add
Code:
jobRepository.updateExecutionContext(execution)
to get your test to pass.

The core tests are not supposed to pass with MySQL. If you try the integration tests or the samples they should work (but we don't test it very often). I just tried the core integration tests (spring-batch-core-tests project) and it worked with a couple of config tweaks (which I have now pushed to github, so if you try it yourself get the latest version).

So I'm still not sure what is the root cause of your original problem. What data are you trying to persist in the context? Maybe there is a serialization error that we haven't seen yet?