Roundtrip test

Add a roundtrip test.