t: add tests for restore