### Question:
ClearInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { try { locationService.clearUserLocation(); } catch (Exception e) { LOGGER.error("Failed to clear current user's location", e); } return true; } @Autowired  ClearInterceptor(LocationService locationService); @Override boolean preHandle(HttpServletRequest request,
            HttpServletResponse response, Object handler);  }### Answer:
@Test public void testUserLocationWasCleared() { assertTrue(interceptor.preHandle(request, response, handler)); verify(service).clearUserLocation(); }