@Test
public void testFilterSuccess() throws Exception {

    checkFile();
    final SpringMvcSofaTracerFilter filter = new SpringMvcSofaTracerFilter();
    MockHttpServletRequest request = new MockHttpServletRequest();
    MockHttpServletResponse response = new MockHttpServletResponse();
    FilterChain mockFilterChain = new FilterChain() {
        public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse)
                                                                                            throws IOException,
                                                                                            ServletException {
        }
        public void init(FilterConfig theConfig) {
        }
        public void destroy() {
        }
    };
    try {
        filter.doFilter(request, response, mockFilterChain);
    } catch (Exception e) {
        Assert.fail("Failed to execute SpringMvcSofaTracerFilter");
    }
    Thread.sleep(500);
    //wait for async output
    List<String> contents = FileUtils.readLines(new File(logDirectoryPath
                                                         + File.separator
                                                         + SpringMvcLogEnum.SPRING_MVC_DIGEST
                                                             .getDefaultLogName()));
    Assert.assertTrue(contents.size() == 1);
    //wait for async output
    List<String> result = FileUtils.readLines(new File(logDirectoryPath + File.separator
                                                       + "tracer-self.log"));
    Assert.assertTrue(result.size() == 2);
}