### Question:
TaskLogFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(ILoggingEvent event) { if (event.getThreadName().startsWith(LoggerUtils.TASK_LOGGER_THREAD_NAME) || event.getLoggerName().startsWith(" - " + TASK_APPID_LOG_FORMAT) || event.getLevel().isGreaterOrEqual(level)) { return FilterReply.ACCEPT; } return FilterReply.DENY; }  void setLevel(String level); @Override FilterReply decide(ILoggingEvent event);  }### Answer:
@Test public void decide() { TaskLogFilter taskLogFilter = new TaskLogFilter(); FilterReply filterReply = taskLogFilter.decide(new ILoggingEvent() { @Override public String getThreadName() { return LoggerUtils.TASK_LOGGER_THREAD_NAME; } @Override public Level getLevel() { return Level.INFO; } @Override public String getMessage() { return "raw script : echo 222"; } @Override public Object[] getArgumentArray() { return new Object[0]; } @Override public String getFormattedMessage() { return "raw script : echo 222"; } @Override public String getLoggerName() { return null; } @Override public LoggerContextVO getLoggerContextVO() { return null; } @Override public IThrowableProxy getThrowableProxy() { return null; } @Override public StackTraceElement[] getCallerData() { return new StackTraceElement[0]; } @Override public boolean hasCallerData() { return false; } @Override public Marker getMarker() { return null; } @Override public Map<String, String> getMDCPropertyMap() { return null; } @Override public Map<String, String> getMdc() { return null; } @Override public long getTimeStamp() { return 0; } @Override public void prepareForDeferredProcessing() { } }); Assert.assertEquals(FilterReply.ACCEPT, filterReply); }