Add test for testkeyandsave