diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java index 811054c294..50687d38f2 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java @@ -21,6 +21,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.tracer.GlobalTracer; import co.elastic.apm.agent.impl.Tracer; +import co.elastic.apm.agent.tracer.reporting.ReportingTracer; import org.stagemonitor.configuration.ConfigurationOptionProvider; import org.stagemonitor.configuration.ConfigurationRegistry; @@ -38,7 +39,7 @@ public class ConfigurationExporter { public static void main(String[] args) throws Exception { ElasticApmTracer tracer = mock(ElasticApmTracer.class); - doReturn(tracer).when(tracer).require(ElasticApmTracer.class); + doReturn(tracer).when(tracer).require(ReportingTracer.class); doReturn(Tracer.TracerState.UNINITIALIZED).when(tracer).getState(); GlobalTracer.init(tracer); try { diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java index 22e8534486..9b2877b6ff 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java @@ -23,6 +23,7 @@ import co.elastic.apm.agent.tracer.GlobalTracer; import co.elastic.apm.agent.impl.Tracer; import co.elastic.apm.agent.sdk.ElasticApmInstrumentation; +import co.elastic.apm.agent.tracer.reporting.ReportingTracer; import co.elastic.apm.agent.util.DependencyInjectingServiceLoader; import freemarker.template.Configuration; import freemarker.template.Template; @@ -88,7 +89,7 @@ class ConfigurationExporterTest { void setUp() { renderedDocumentationPath = Paths.get("../../docs/configuration.asciidoc"); ElasticApmTracer tracer = mock(ElasticApmTracer.class); - doReturn(tracer).when(tracer).require(ElasticApmTracer.class); + doReturn(tracer).when(tracer).require(ReportingTracer.class); doReturn(Tracer.TracerState.UNINITIALIZED).when(tracer).getState(); GlobalTracer.init(tracer); configurationRegistry = ConfigurationRegistry.builder()