Make unit tests work with new objects in array