Cleans up unit test a bit.
Fixes a bug that updating the parent record data hash failed to update the nested record hashes as well.