ObjCObjectTypeConverter implements TypeConverter { public Object toNative(Object value, ToNativeContext context) { if (value == null) { return null; } ObjCObject valueAsNSObject = (ObjCObject) value; ID idToReturn = valueAsNSObject.id(); return idToReturn.toNative(); } ObjCObjectTypeConverter(Class<T> javaType); Class<?> nativeType(); T fromNative(Object nativeValue, FromNativeContext context); Object toNative(Object value, ToNativeContext context);  }
@Test public void convertsNullAsArgumentToNull() { ToNativeConverter converter = new ObjCObjectTypeConverter(ObjCObject.class); assertEquals(null, converter.toNative(null, null)); }