Source:
<code>public void exceptionDuringClientSend() throws Exception { LogCounter errorStringLog = new LogCounter("ERROR", <START> true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); <END> LogCounter resteasyExceptionLog = new LogCounter( ".*ERROR .* RESTEASY004672.*", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER, true); LogCounter yassonExceptionLog = new LogCounter( "Caused by: javax.json.bind.JsonbException", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); LogCounter yassonStacktraceLog = new LogCounter("at org.eclipse.yasson", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); LogCounter applicationExcpetionLog = new LogCounter( "Caused by: java.lang.RuntimeException: "+ JsonBindingDebugLoggingItemCorruptedGet.class.getSimpleName(), true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); try { WebTarget base = client.target(generateURL("/get/ok")); base.request().post(Entity.entity(new JsonBindingDebugLoggingItemCorruptedGet(), MediaType.APPLICATION_JSON)); } catch (ProcessingException e) { StringWriter errors = new StringWriter(); e.printStackTrace(new PrintWriter(errors)); String stackTrace = errors.toString(); Assert.assertThat("Stracktrace doesn't contain javax.json.bind.JsonbException", stackTrace, containsString("javax.json.bind.JsonbException")); Assert.assertThat("Stracktrace doesn't contain yasson part", stackTrace, containsString("org.eclipse.yasson.internal")); Assert.assertThat("Stracktrace doesn't contain application exception", stackTrace, containsString("Caused by: java.lang.RuntimeException: " + JsonBindingDebugLoggingItemCorruptedGet.class.getSimpleName())); } Assert.assertThat("Application Exception should be logged", applicationExcpetionLog.count(), is(1)); Assert.assertThat("RESTEasy exception should be logged", resteasyExceptionLog.count(), is(1)); Assert.assertThat("Yasson exception should be logged", yassonExceptionLog.count(), is(1)); Assert.assertThat("Yasson exception stacktrace should be logged", yassonStacktraceLog.count(), greaterThan(0)); }</code><technical_language>"server log"</technical_language>

Target:
public void exceptionDuringClientSend() throws Exception { LogCounter errorStringLog = new LogCounter("ERROR", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); LogCounter resteasyExceptionLog = new LogCounter( ".*DEBUG .* RESTEASY004672.*", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER, true); LogCounter yassonExceptionLog = new LogCounter( "Caused by: javax.json.bind.JsonbException", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); LogCounter yassonStacktraceLog = new LogCounter("at org.eclipse.yasson", true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); LogCounter applicationExcpetionLog = new LogCounter( "Caused by: java.lang.RuntimeException: "+ JsonBindingDebugLoggingItemCorruptedGet.class.getSimpleName(), true, ContainerConstants.DEFAULT_CONTAINER_QUALIFIER); try { WebTarget base = client.target(generateURL("/get/ok")); base.request().post(Entity.entity(new JsonBindingDebugLoggingItemCorruptedGet(), MediaType.APPLICATION_JSON)); } catch (ProcessingException e) { StringWriter errors = new StringWriter(); e.printStackTrace(new PrintWriter(errors)); String stackTrace = errors.toString(); Assert.assertThat("Stracktrace doesn't contain javax.json.bind.JsonbException", stackTrace, containsString("javax.json.bind.JsonbException")); Assert.assertThat("Stracktrace doesn't contain yasson part", stackTrace, containsString("org.eclipse.yasson.internal")); Assert.assertThat("Stracktrace doesn't contain application exception", stackTrace, containsString("Caused by: java.lang.RuntimeException: " + JsonBindingDebugLoggingItemCorruptedGet.class.getSimpleName())); } Assert.assertThat("Application Exception should be logged", applicationExcpetionLog.count(), is(1)); Assert.assertThat("Yasson exception should be logged", yassonExceptionLog.count(), is(1)); Assert.assertThat("RESTEasy exception should be logged", resteasyExceptionLog.count(), is(1)); Assert.assertThat("Yasson exception stacktrace should be logged", yassonStacktraceLog.count(), greaterThan(0)); Assert.assertThat("There shouldn't be any error logs in client", errorStringLog.count(), is(0)); }