Rococoa { public static <T extends ObjCObject> T wrap(ID id, Class<T> javaClass) { return wrap(id, javaClass, true); } private  Rococoa(); static T createClass(String ocClassName, Class<T> type); static T create(String ocClassName, Class<T> javaClass, String ocMethodName, Object... args); static T create(String ocClassName, Class<T> javaClass); static T wrap(ID id, Class<T> javaClass); static T cast(ObjCObject object, Class<T> desiredType); static T wrap(ID id, Class<T> javaClass, boolean retain); @Deprecated static ID wrap(Object javaObject); static ObjCObject proxy(Object javaObject); static T proxy(Object javaObject, Class<T> javaType);  }
@Test public void testEqualsWithAliases() { NSNumber fortyTwo = NSNumber.CLASS.numberWithInt(42); NSNumber fortyTwoAlias = Rococoa.wrap(fortyTwo.id(), NSNumber.class); NSNumber fortyThree = NSNumber.CLASS.numberWithInt(43); assertTrue(fortyTwo.equals(fortyTwoAlias)); assertTrue(fortyTwoAlias.equals(fortyTwo)); assertFalse(fortyTwo.equals(fortyThree)); assertFalse(fortyTwo.equals(null)); }