BeanConversionService implements ConversionService { public <U, T> T convert(U source, Class<T> aClass, BiFunction<U, T, T>... onTheFlyConvert) { T current = convert(source, aClass); for (BiFunction<U, T, T> function : onTheFlyConvert) { current = function.apply(source, current); } return current; }  static RegistrationBuilder<T> fromBean(Class<T> source); void register(Registration<?> registration); boolean has(Class<?> modelClass); void clear(); @Override boolean canConvert(TypeDescriptor typeDescriptor, TypeDescriptor typeDescriptor1); @Override boolean canConvert(Class<?> aClass, Class<?> aClass1); T convert(U source, Class<T> aClass, BiFunction<U, T, T>... onTheFlyConvert); @Override @NewSpan("conversion") U convert(Object source, @SpanTag("target") Class<U> targetClass); @Override Object convert(Object o, TypeDescriptor typeDescriptor, TypeDescriptor typeDescriptor1);  }
@Test public void shouldBeNullForNullObjectToConvert() throws Exception { assertNull(conversionService.convert(null, Object.class)); }