### Question:
LoggingFilter implements ContainerRequestFilter, ContainerResponseFilter { @Override public void filter(final ContainerRequestContext request) { log("Enter", request); }  @Override void filter(final ContainerRequestContext request); @Override void filter(final ContainerRequestContext request, final ContainerResponseContext response); @Context void setResourceInfo(final ResourceInfo resourceInfo);  }### Answer:
@Test public void filterRequest() { ContainerRequestContext request = mock(ContainerRequestContext.class); loggingFilter.filter(request); assertThat(loggingFilter).isNotNull(); }
@Test public void filterRequestAndResponse() { ContainerRequestContext request = mock(ContainerRequestContext.class); ContainerResponseContext response = mock(ContainerResponseContext.class); Response.StatusType statusInfo = mock(Response.StatusType.class); when(response.getStatusInfo()).thenReturn(statusInfo); loggingFilter.filter(request, response); assertThat(loggingFilter).isNotNull(); }