Added test for adding a trait to an object instance.