Improve unit tests to detect keys that shouldn't be there