@Override
    public boolean putFilter(File file) {
        if (!filterRegistry.isMutable()) {
            return false;
        }
        try {
            String sName = file.getAbsolutePath();
            if (filterClassLastModified.get(sName) != null
                    && (file.lastModified() != filterClassLastModified.get(sName))) {
                LOG.debug("reloading filter {}", sName);
                filterRegistry.remove(sName);
            }
            ZuulFilter<?, ?> filter = filterRegistry.get(sName);
            if (filter == null) {
                Class<?> clazz = compiler.compile(file);
                if (!Modifier.isAbstract(clazz.getModifiers())) {
                    filter = filterFactory.newInstance(clazz);
                    putFilter(sName, filter, file.lastModified());
                    return true;
                }
            }
        } catch (Exception e) {
            LOG.error("Error loading filter! Continuing. file={}", file, e);
            return false;
        }

        return false;
    }
@Test
    void testGetFilterFromFile() throws Exception {
        assertTrue(loader.putFilter(file));

        Collection<ZuulFilter<?, ?>> filters = registry.getAllFilters();
        assertEquals(1, filters.size());
    }