@Test
public void testDoFilterInternal_occur_exception() throws ServletException, IOException {

    // do setup.
    ServletException occurException = new ServletException("test");
    doThrow(occurException).when(mockFilterChain).doFilter(mockRequest,
            mockResponse);
    MDC.put("key0", "value0");
    // do test.
    try {
        testTarget.doFilterInternal(mockRequest, mockResponse,
                mockFilterChain);
        fail("don't occur ServletException.");
    } catch (ServletException e) {
        // do assert.
        // throws original exception.
        assertThat(e, is(occurException));
    }
    // do assert.
    // remove all values from MDC on after chain.
    assertThat(MDC.getCopyOfContextMap(), is(nullValue()));
}