<commit_before>package org.microbule.decorator.tracer;

import org.junit.Test;
import org.microbule.core.JaxrsProxyFactoryImpl;
import org.microbule.test.hello.HelloService;
import org.microbule.test.hello.HelloTestCase;
import org.slf4j.MDC;

public class TracerProxyDecoratorTest extends HelloTestCase {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

    @Override
    protected void addDecorators(JaxrsProxyFactoryImpl factory) {
        factory.addDecorator("tracer", new TracerProxyDecorator(TracerConstants.DEFAULT_TRACE_ID_HEADER));
    }

    @Test
    public void testWithCustomTraceId() {
        final HelloService proxy = createProxy();
        MDC.put(TracerConstants.TRACE_ID_KEY, "foobarbaz");
        assertEquals("Hello, Microbule!", proxy.sayHello("Microbule"));
    }
}<commit_msg>Improving code coverage.<commit_after>package org.microbule.decorator.tracer;

import org.junit.Test;
import org.microbule.core.JaxrsProxyFactoryImpl;
import org.microbule.test.hello.HelloService;
import org.microbule.test.hello.HelloTestCase;
import org.slf4j.MDC;

public class TracerProxyDecoratorTest extends HelloTestCase {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

    @Override
    protected void addDecorators(JaxrsProxyFactoryImpl factory) {
        factory.addDecorator("tracer", new TracerProxyDecorator(TracerConstants.DEFAULT_TRACE_ID_HEADER));
    }

    @Test
    public void testWithCustomTraceId() {
        final HelloService proxy = createProxy();
        MDC.put(TracerConstants.TRACE_ID_KEY, "foobarbaz");
        assertEquals("Hello, Microbule!", proxy.sayHello("Microbule"));
        MDC.remove(TracerConstants.TRACE_ID_KEY);
    }
}
{'fraction_non_alphanumeric': 0.3057019645424054, 'fraction_numerical': 0.0009583133684714902, 'mean_word_length': 1.7365661861074706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1094172', 'n_tokens_mistral': 526, 'n_tokens_neox': 505, 'n_words': 83}