LoggerAndMDCFilter extends MatchingFilter { @Override public void start() { int errors = 0; if (OptionHelper.isEmpty(topLogger)) { addWarn("The \"topLogger\" property is not set. Default to ROOT logger."); topLogger = Logger.ROOT_LOGGER_NAME; } if (OptionHelper.isEmpty(key)) { addError("The \"key\" property must be set"); errors++; } if (errors == 0) { super.start(); } }  String getKey(); void setKey(String key); String getTopLogger(); void setTopLogger(String topLogger); @Override FilterReply decide(Marker marker, Logger logger, Level level,
        String s, Object[] objects, Throwable throwable); @Override void start();  }
@Test public void testStart() { filter = new LoggerAndMDCFilter(); filter.setContext(context); filter.start(); assertFalse(filter.isStarted()); filter.setTopLogger("org.candlepin"); filter.start(); assertFalse(filter.isStarted()); filter.setKey("foo"); filter.start(); assertTrue(filter.isStarted()); }