how to reflect two class that have difference fields?
<p>I want to reflect from class A to class B, but they two have difference filedNames, how to make it fast to set A's field to B's field.</p>

<pre><code>@Data // lombok
class A {
  private Long id;
  private String name;
}

@Data
class B {
  private Long userId;
  private String userName;
}

class MainClass {

    @Test
    public void testReflect() {
      A a = new A();
      a.setId(1L);
      a.setName("testName");
      B b = new B();
      // how to reflect a.id to b.userId and a.name to b.userName
    }

}
</code></pre>

<p>just see the MainClass and how to reflect a.id to b.userId and a.name to b.userName?
I've tried add annotation <code>@JsonProperty("name")</code> on class B, and use <code>DozerBeanMapper</code>, but it failed to resolve my problem;</p>