@SmallTest @MediumTest @LargeTest public void testCastingToSameTypeGivesSameObject() { Base base = GraphObject.Factory.create(Base.class); Base cast = base.cast(Base.class); assertTrue(base == cast); }
@SmallTest @MediumTest @LargeTest public void testCastingToBaseTypeGivesSameObject() { Derived derived = GraphObject.Factory.create(Derived.class); Base cast = derived.cast(Base.class); assertTrue(derived == cast); cast = cast.cast(Derived.class); assertTrue(derived == cast); }