### Question:
ConfigurableWroFilter extends WroFilter { public void setMbeanName(final String mbeanName) { this.mbeanName = mbeanName; }  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 shouldUseConfiguredMBeanNameWhenSet() throws Exception { final String mbeanName = "mbean"; final ConfigurableWroFilter filter = new SampleConfigurableWroFilter() { @Override protected void onRequestProcessed() { assertEquals(mbeanName, Context.get().getConfig().getMbeanName()); } }; filter.setMbeanName(mbeanName); filter.init(mockFilterConfig); Context.unset(); filter.doFilter(mockRequest, mockResponse, mockFilterChain); }
@Test public void shouldUseNullMBeanWhenNotSet() throws Exception { final ConfigurableWroFilter filter = new SampleConfigurableWroFilter() { @Override protected void onRequestProcessed() { assertNull(Context.get().getConfig().getMbeanName()); } }; filter.setMbeanName(null); filter.init(mockFilterConfig); Context.unset(); filter.doFilter(mockRequest, mockResponse, mockFilterChain); }