improve tests for object def