### Question:
ConfigurableWroFilter extends WroFilter { public void setProperties(final Properties properties) { this.properties = properties; }  void setDisableCache(final boolean disableCache); void setMbeanName(final String mbeanName); void setJmxEnabled(final boolean jmxEnabled); final void setDebug(final boolean debug); final void setGzipEnabled(final boolean gzipEnabled); final void setCacheUpdatePeriod(final long cacheUpdatePeriod); final void setModelUpdatePeriod(final long modelUpdatePeriod); void setProperties(final Properties properties); String getEncoding(); void setEncoding(final String encoding);  }### Answer:
@Test public void testFilterWithPropertiesSet() throws Exception { final ConfigurableWroFilter filter = new ConfigurableWroFilter() { @Override protected void onRequestProcessed() { assertEquals(10, Context.get().getConfig().getCacheUpdatePeriod()); } }; final Properties properties = new Properties(); properties.setProperty(ConfigConstants.cacheUpdatePeriod.name(), "10"); filter.setProperties(properties); filter.init(mockFilterConfig); filter.doFilter(mockRequest, mockResponse, mockFilterChain); }
@Test public void shouldUseCorrectWroManagerFactoryWhenPropertiesAreLoadedFromCustomLocation() throws Exception { final Properties props = new Properties(); props.setProperty(ConfigConstants.managerFactoryClassName.name(), NoProcessorsWroManagerFactory.class.getName()); victim.setProperties(props); victim.init(mockFilterConfig); final WroManagerFactory actual = ((DefaultWroManagerFactory) victim.getWroManagerFactory()).getFactory(); assertEquals(NoProcessorsWroManagerFactory.class, actual.getClass()); }
@Test(expected = WroRuntimeException.class) public void shouldFailWhenAnInvalidWroManagerClassNameIsLoadedFromCustomLocation() throws Exception { final Properties props = new Properties(); props.setProperty(ConfigConstants.managerFactoryClassName.name(), "invalid"); victim.setProperties(props); victim.init(mockFilterConfig); }