Refactor test to use snapshots