add test for dump and restore