JacksonUtil { public static Object fromTo( final Object _from, final Map<Class<?>, StdSerializer<?>> _custom_serializers, final Class _view, final Class<?> _to) { final String json = JacksonUtil.asJsonString(_from, _custom_serializers, _view); return JacksonUtil.asObject(json, _to); }  static String asJsonString(final Object _object); static String asJsonString(
      final Object _object, final Map<Class<?>, StdSerializer<?>> _custom_serializers); @SuppressWarnings({"unchecked", "rawtypes"}) @SuppressFBWarnings( value = "WMI_WRONG_MAP_ITERATOR", justification = "Use of entrySet causes troubles with generics") static String asJsonString(
      final Object _object,
      final Map<Class<?>, StdSerializer<?>> _custom_serializers,
      final Class _view); static Object asObject(final String _json, final Class<?> _clazz); @SuppressWarnings({"unchecked", "rawtypes"}) @SuppressFBWarnings( value = "WMI_WRONG_MAP_ITERATOR", justification = "Use of entrySet causes troubles with generics") static Object asObject(
      final String _json,
      final Map<Class<?>, StdDeserializer<?>> _custom_deserializers,
      final Class<?> _clazz); static Object fromTo(
      final Object _from,
      final Map<Class<?>, StdSerializer<?>> _custom_serializers,
      final Class _view,
      final Class<?> _to);  }
@Test public void testFromTo() { final A a = new A(); a.setAnInt(1); a.setAString("Foo"); final B b = (B) JacksonUtil.fromTo(a, null, null, B.class); assertEquals(1, b.anInt); assertEquals("Foo", b.aString); }