Fix restore tests, add new tests