### Question:
ConsentLoggingInterceptor extends HandlerInterceptorAdapter { @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { TppLogger.logResponse(response) .withTpp(tppService.getTppInfo()) .withResponseStatus() .withOptionalRedirectId(redirectIdService.getRedirectId()) .withParam("consentStatus", loggingContextService.getConsentStatus()) .withParam("scaStatus", loggingContextService.getScaStatus()) .perform(); }  @Override boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler); @Override void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex);  }### Answer:
@Test void afterCompletion_success() { when(response.getStatus()).thenReturn(HttpServletResponse.SC_OK); when(redirectIdService.getRedirectId()).thenReturn(REDIRECT_ID); interceptor.afterCompletion(request, response, null, null); verify(tppService).getTppInfo(); verify(response).getStatus(); verify(redirectIdService).getRedirectId(); verify(loggingContextService).getConsentStatus(); verify(loggingContextService).getScaStatus(); }