Add round-trip tests

NB. As the save rules don't exist in this branch yet, the last part of the test hasn't been fully exercised.