@Test void testGetSetterWithException() { @Data class PersonWithExceptionSetter { private String id; public void setId(final String id) { throw new UnsupportedOperationException("Foo"); } } final PersonWithExceptionSetter person = new PersonWithExceptionSetter(); final BiConsumer<PersonWithExceptionSetter, Object> setter = of(PersonWithExceptionSetter.class) .field("id").getSetter(); assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> setter.accept(person, "foo")) .withMessage("Foo"); }
public <F> @NonNull FunctionalProperty<T, F> field(final @NonNull String name) { final PropertyDescriptor descriptor = this.getPropertyDescriptor(name); return new FunctionalProperty<>(descriptor); }
FunctionalClass { public <F> @NonNull FunctionalProperty<T, F> field(final @NonNull String name) { final PropertyDescriptor descriptor = this.getPropertyDescriptor(name); return new FunctionalProperty<>(descriptor); } }
FunctionalClass { public <F> @NonNull FunctionalProperty<T, F> field(final @NonNull String name) { final PropertyDescriptor descriptor = this.getPropertyDescriptor(name); return new FunctionalProperty<>(descriptor); }  }
FunctionalClass { public <F> @NonNull FunctionalProperty<T, F> field(final @NonNull String name) { final PropertyDescriptor descriptor = this.getPropertyDescriptor(name); return new FunctionalProperty<>(descriptor); }  FunctionalProperty<T, F> field(final @NonNull String name); Supplier<T> getConstructor(); }
FunctionalClass { public <F> @NonNull FunctionalProperty<T, F> field(final @NonNull String name) { final PropertyDescriptor descriptor = this.getPropertyDescriptor(name); return new FunctionalProperty<>(descriptor); }  FunctionalProperty<T, F> field(final @NonNull String name); Supplier<T> getConstructor();  }