Test for creating an object