RequestBeanWriter { public void registerBean(Class<?> beanClass, BeanClassValidator validator) { if (!beanContext.containsKey(beanClass)) { validator.validate(beanClass); beanContext.put(beanClass, new BeanContext<>(beanClass)); } }  void registerQueryParam(Class<T> beanClass, BeanClassNameValidator beanClassNameValidator); void registerBean(Class<?> beanClass, BeanClassValidator validator); Map<String, String> toParams(Class<T> beanClass, T bean); byte[] toJSON(Class<T> beanClass, T bean);  }
@Test void register() { writer.registerBean(TestBean.class, validator); writer.registerBean(TestBean.class, validator); }