adding tests for compareObjects