### Question:
ContainerSecurityResponseFilter implements ContainerResponseFilter { @Override public void filter(final ContainerRequestContext requestContext, final ContainerResponseContext responseContext) throws IOException { SecurityContextHolder.clear(); }  @Override void filter(final ContainerRequestContext requestContext, final ContainerResponseContext responseContext);  }### Answer:
@Test public void shouldClearPrincipal_onFilter() throws Exception { mockStatic(SecurityContextHolder.class); final ContainerRequestContext mockContainerRequestContext = mock(ContainerRequestContext.class); final ContainerResponseContext mockContainerResponseContext = mock(ContainerResponseContext.class); final ContainerSecurityResponseFilter containerSecurityResponseFilter = new ContainerSecurityResponseFilter(); containerSecurityResponseFilter.filter(mockContainerRequestContext, mockContainerResponseContext); verifyStatic(SecurityContextHolder.class); SecurityContextHolder.clear(); }