Add test for creation of objects with undefined key