Test refactor to use deepEqual