### Question:
TraceeServerHandler extends AbstractTraceeHandler { protected final void handleIncoming(SOAPMessageContext context) { final SOAPMessage soapMessage = context.getMessage(); try { final SOAPHeader header = soapMessage.getSOAPHeader(); if (header != null && traceeBackend.getConfiguration().shouldProcessContext(IncomingRequest)) { final Map<String, String> parsedContext = transportSerialization.parseSoapHeader(header); final Map<String, String> filteredContext = traceeBackend.getConfiguration().filterDeniedParams(parsedContext, IncomingRequest); traceeBackend.putAll(filteredContext); } } catch (final SOAPException e) { logger.warn("Error during precessing of inbound soap header: {}", e.getMessage()); logger.debug("Detailed: Error during precessing of inbound soap header: {}", e.getMessage(), e); } Utilities.generateInvocationIdIfNecessary(traceeBackend); } TraceeServerHandler();  TraceeServerHandler(TraceeBackend traceeBackend, SoapHeaderTransport soapHeaderTransport); @Override boolean handleFault(SOAPMessageContext context);  }### Answer:
@Test public void testHandleIncoming() throws SOAPException { when(soapHeaderTransport.parseSoapHeader(eq(message.getSOAPHeader()))).thenReturn(Collections.singletonMap("FOO", "BAR")); unit.handleIncoming(messageContext); verify(backend).putAll(Collections.singletonMap("FOO", "BAR")); }
@Test public void generateInvocationIdEvenWhenIncomingMessageCouldntParsed() throws SOAPException { when(message.getSOAPHeader()).thenThrow(new SOAPException()); unit.handleIncoming(messageContext); assertThat(backend.copyToMap(), hasKey(TraceeConstants.INVOCATION_ID_KEY)); }