private static Class<? extends Number> primitiveTypeOfID =
(Class<? extends Number>) new ID().nativeType();
@Test public void convertsNSObjectAsArgumentToID() {
ToNativeConverter converter = new ObjCObjectTypeConverter(ObjCObject.class);
// We treat all NSObject's equally in toNative, see RococoaTypeMapper
assertEquals(primitiveTypeOfID, converter.nativeType());
NSObject nsObject = Rococoa.create("NSObject", NSObject.class);
Number nativeValue = (Number) converter.toNative(nsObject, null);
assertEquals(primitiveTypeOfID, nativeValue.getClass());
assertEquals(nsObject.id().longValue(), nativeValue.longValue());
}