tests for marshal and unmarshal