public FilterRegistration.Dynamic addFilter(String name, Filter filter) {
        return addFilter(name, new FilterHolder(requireNonNull(filter)));
    }
@Test
    void addsFilterClasses() throws Exception {
        final Class<WelcomeFilter> filterClass = WelcomeFilter.class;
        final FilterRegistration.Dynamic builder = environment.addFilter("filter", filterClass);
        assertThat(builder).isNotNull();

        try {
            servletHandler.start();

            final FilterHolder filterHolder = servletHandler.getFilter("filter");
            assertThat(filterHolder.getFilter()).isExactlyInstanceOf(filterClass);
        } finally {
            servletHandler.stop();
        }
    }