Improve tests for object creation