PathHelper { public static <T> T forEntity(Class<T> clazz) { return forEntity(clazz, "", null); }  static T forEntity(Class<T> clazz);  }
@Test public void test() { Assert.assertEquals("address", PathHelper.forEntity(Customer.class).getAddress().toString()); Assert.assertEquals("address.lineOne", PathHelper.forEntity(Customer.class).getAddress().getLineOne()); Assert.assertEquals("customers.firstName", PathHelper.forEntity(Company.class).getCustomers().get(0).getFirstName()); Assert.assertEquals("customers", PathHelper.forEntity(Company.class).getCustomers().toString()); }