### Question:
TraceeClientHandler extends AbstractTraceeHandler { protected final void handleIncoming(final SOAPMessageContext context) { final SOAPMessage msg = context.getMessage(); if (msg != null && traceeBackend.getConfiguration().shouldProcessContext(OutgoingRequest)) { try { final SOAPHeader header = msg.getSOAPHeader(); if (header != null) { final Map<String, String> parsedContext = transportSerialization.parseSoapHeader(header); traceeBackend.putAll(traceeBackend.getConfiguration().filterDeniedParams(parsedContext, OutgoingRequest)); } } 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); } } } TraceeClientHandler();  TraceeClientHandler(TraceeBackend traceeBackend); @Override final boolean handleFault(final SOAPMessageContext context);  }### Answer:
@Test public void skipProcessingWithoutErrorIfNoTpicHeaderIsInMessage() throws SOAPException { unit.handleIncoming(messageContext); assertThat(backend.isEmpty(), is(true)); }
@Test public void skipProcessingWithoutErrorIfNoSoapHeaderIsInMessage() throws SOAPException { when(message.getSOAPHeader()).thenReturn(null); unit.handleIncoming(messageContext); assertThat(backend.isEmpty(), is(true)); }
@Test public void catchExceptionOnReadTpicHeader() throws SOAPException { when(message.getSOAPHeader()).thenThrow(new SOAPException()); unit.handleIncoming(messageContext); assertThat(backend.isEmpty(), is(true)); }
@Test public void readSoapHeaderIntoToBackend() throws SOAPException, JAXBException { final Map<String, String> context = new HashMap<>(); context.put("abc", "123"); new SoapHeaderTransport().renderSoapHeader(context, message.getSOAPHeader()); when(messageContext.getMessage()).thenReturn(message); unit.handleIncoming(messageContext); assertThat(backend.copyToMap(), hasEntry("abc", "123")); }