### Question:
BeanValidationActivator { public static void activateBeanValidation(final Set<BapiInterceptor> bapiInterceptors, final SessionManagerConfig sessionManagerConfig) { ValidationMode validationMode = sessionManagerConfig.getValidationMode(); if (validationMode != ValidationMode.NONE) { if (shouldActivateBeanValidation(validationMode)) { LOGGER.info("Activating Bean Validation"); activateBeanValidationWithTypeSafeActivator(bapiInterceptors, sessionManagerConfig); } } } private  BeanValidationActivator(); static void activateBeanValidation(final Set<BapiInterceptor> bapiInterceptors,
                                              final SessionManagerConfig sessionManagerConfig);  }### Answer:
@Test public void doesNotAddInterceptorWhenValidationModeNoneIsConfigured() { Set<BapiInterceptor> interceptors = new HashSet<>(); final SessionManagerConfig config = new SessionManagerConfig().setValidationMode(ValidationMode.NONE); BeanValidationActivator.activateBeanValidation(interceptors, config); assertThat(interceptors).hasSize(0); }
@Test public void addsBeanValidationInterceptorWhenValidationTypeAutoIsConfigured() { Set<BapiInterceptor> interceptors = new HashSet<>(); final SessionManagerConfig config = new SessionManagerConfig().setValidationMode(ValidationMode.AUTO); BeanValidationActivator.activateBeanValidation(interceptors, config); assertThat(interceptors).hasSize(1); assertThat(interceptors.iterator().next()).isInstanceOf(BeanValidationInterceptor.class); }