DelegateJsonComponent implements JsonComponent { @SafeVarargs @SuppressWarnings("varargs") @Override public final <ENTITY> JsonEncoder<ENTITY> of(Manager<ENTITY> manager, Field<ENTITY>... fields) { return inner.of(manager, fields); } DelegateJsonComponent(ProjectComponent projectComponent); @Override JsonEncoder<ENTITY> noneOf(Manager<ENTITY> manager); @Override JsonEncoder<ENTITY> allOf(Manager<ENTITY> manager); @SafeVarargs @SuppressWarnings("varargs") @Override final JsonEncoder<ENTITY> of(Manager<ENTITY> manager, Field<ENTITY>... fields);  }
@Test void of() { final JsonEncoder<User> encoder = instance.of(userManager, User.NAME); final String actual = encoder.apply(user); assertFalse(actual.contains("id")); assertFalse(actual.contains(Integer.toString(ID))); assertTrue(actual.contains("name")); assertTrue(actual.contains(NAME)); }