RequestBeanReader { public <T> T fromJSON(Class<T> beanClass, byte[] body) throws IOException { BeanContext<T> context = ContextHelper.context(beanContext, beanClass); T bean = context.reader.fromJSON(body); context.validator.validate(bean, false); return bean; }  void registerQueryParam(Class<T> beanClass, BeanClassNameValidator beanClassNameValidator); void registerBean(Class<?> beanClass, BeanClassValidator validator); boolean containsQueryParam(Class<?> beanClass); boolean containsBean(Class<?> beanClass); T fromParams(Class<T> beanClass, Map<String, String> params); T fromJSON(Class<T> beanClass, byte[] body);  }
@Test void fromJSON() { assertThatThrownBy(() -> reader.fromJSON(String.class, new byte[0])) .isInstanceOf(Error.class) .hasMessageContaining("bean class must not be java built-in class"); }