@Test
void validateResponseBeanType() throws NoSuchMethodException {

    var validator = new WebServiceInterfaceValidator(TestWebService.class, new BeanClassValidator());
    var method = TestWebService.class.getDeclaredMethod("get", Integer.class);
    assertThatThrownBy(() -> validator.validateResponseBeanType(Integer.class, method))
            .isInstanceOf(Error.class).hasMessageContaining("response bean type must be bean class or Optional<T>");
    assertThatThrownBy(() -> validator.validateResponseBeanType(Types.map(String.class, String.class), method))
            .isInstanceOf(Error.class).hasMessageContaining("response bean type must be bean class or Optional<T>");
}