### Question:
ZipkinHttpRequestUuidResolver extends HttpRequestUuidResolver<Ignore> { @Override public void resolve(HttpCommand httpCommand, Ignore ignore, DehydratedExecutionContextBuilder builder) { RequestUUID cougarUuid = resolve(httpCommand); HttpServletRequest request = httpCommand.getRequest(); String traceId = request.getHeader(ZipkinKeys.TRACE_ID); String spanId = request.getHeader(ZipkinKeys.SPAN_ID); String parentSpanId = request.getHeader(ZipkinKeys.PARENT_SPAN_ID); String sampled = request.getHeader(ZipkinKeys.SAMPLED); String flags = request.getHeader(ZipkinKeys.FLAGS); int port = request.getLocalPort(); RequestUUID requestUUID = zipkinManager.createNewZipkinRequestUUID(cougarUuid, traceId, spanId, parentSpanId, sampled, flags, port); builder.setRequestUUID(requestUUID); } ZipkinHttpRequestUuidResolver(ZipkinExecutionContextResolverFactory resolverFactory,
                                         ZipkinManager zipkinManager,
                                         String uuidHeader, String uuidParentsHeader); @Override void resolve(HttpCommand httpCommand, Ignore ignore, DehydratedExecutionContextBuilder builder);  }### Answer:
@Test public void resolve_ShouldPopulateZipkinUUID() { String traceId = "123456789"; String spanId = "987654321"; String parentSpanId = "543216789"; String sampled = "1"; String flags = "327"; int port = 9101; String uuidString = "abcde-1234-fghij-5678-klmno"; String uuidParentsString = ""; when(httpCommand.getRequest()).thenReturn(request); when(request.getHeader(ZipkinKeys.TRACE_ID)).thenReturn(traceId); when(request.getHeader(ZipkinKeys.SPAN_ID)).thenReturn(spanId); when(request.getHeader(ZipkinKeys.PARENT_SPAN_ID)).thenReturn(parentSpanId); when(request.getHeader(ZipkinKeys.SAMPLED)).thenReturn(sampled); when(request.getHeader(ZipkinKeys.FLAGS)).thenReturn(flags); when(request.getLocalPort()).thenReturn(port); when(request.getHeader(uuidHeader)).thenReturn(uuidString); when(request.getHeader(uuidParentsHeader)).thenReturn(uuidParentsString); victim = new ZipkinHttpRequestUuidResolver(resolverFactory, zipkinManager, uuidHeader, uuidParentsHeader); when(httpCommand.getRequest()).thenReturn(request); when(zipkinManager.createNewZipkinRequestUUID(any(RequestUUID.class), eq(traceId), eq(spanId), eq(parentSpanId), eq(sampled), eq(flags), eq(port))).thenReturn(requestUUID); victim.resolve(httpCommand, null, contextBuilder); verify(contextBuilder).setRequestUUID(requestUUID); }