### Question:
ElasticApmTracer implements Tracer { synchronized void pause() { if (tracerState != TracerState.RUNNING) { logger.warn("Attempting to pause the agent when it is already in a {} state", tracerState); return; } tracerState = TracerState.PAUSED; logger.info("Tracer switched to PAUSED state"); for (LifecycleListener lifecycleListener : lifecycleListeners) { try { lifecycleListener.pause(); } catch (Exception e) { logger.warn("Suppressed exception while calling pause()", e); } } } ElasticApmTracer(ConfigurationRegistry configurationRegistry, Reporter reporter, ObjectPoolFactory poolFactory, ApmServerClient apmServerClient, MetaData metaData); @Override @Nullable Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader); @Override @Nullable Transaction startRootTransaction(Sampler sampler, long epochMicros, @Nullable ClassLoader initiatingClassLoader); @Override @Nullable Transaction startChildTransaction(@Nullable C headerCarrier, TextHeaderGetter<C> textHeadersGetter, @Nullable ClassLoader initiatingClassLoader); @Override @Nullable Transaction startChildTransaction(@Nullable C headerCarrier, TextHeaderGetter<C> textHeadersGetter, Sampler sampler,
                                                 long epochMicros, @Nullable ClassLoader initiatingClassLoader); @Override @Nullable Transaction startChildTransaction(@Nullable C headerCarrier, BinaryHeaderGetter<C> binaryHeadersGetter, @Nullable ClassLoader initiatingClassLoader); @Override @Nullable Transaction startChildTransaction(@Nullable C headerCarrier, BinaryHeaderGetter<C> binaryHeadersGetter,
                                                 Sampler sampler, long epochMicros, @Nullable ClassLoader initiatingClassLoader); Transaction noopTransaction(); @Override @Nullable Transaction currentTransaction(); Span startSpan(TraceContext.ChildContextCreator<T> childContextCreator, T parentContext); Span startSpan(AbstractSpan<?> parent, long epochMicros); Span startSpan(TraceContext.ChildContextCreator<T> childContextCreator, T parentContext, long epochMicros); @Override void captureAndReportException(@Nullable Throwable e, ClassLoader initiatingClassLoader); @Override @Nullable String captureAndReportException(long epochMicros, @Nullable Throwable e, @Nullable AbstractSpan<?> parent); @Override @Nullable ErrorCapture captureException(@Nullable Throwable e, @Nullable AbstractSpan<?> parent, @Nullable ClassLoader initiatingClassLoader); ConfigurationRegistry getConfigurationRegistry(); T getConfig(Class<T> configProvider); void endTransaction(Transaction transaction); void endSpan(Span span); void endError(ErrorCapture error); void recycle(Transaction transaction); void recycle(Span span); void recycle(ErrorCapture error); synchronized void stop(); Reporter getReporter(); Sampler getSampler(); ObjectPoolFactory getObjectPoolFactory(); @Override @Nullable AbstractSpan<?> getActive(); @Nullable @Override Span getActiveSpan(); @Nullable @Override Span getActiveExitSpan(); void registerSpanListener(ActivationListener activationListener); List<ActivationListener> getActivationListeners(); synchronized void start(boolean premain); synchronized void onStressDetected(); synchronized void onStressRelieved(); @Override boolean isRunning(); @Override TracerState getState(); @Nullable T getLifecycleListener(Class<T> listenerClass); void activate(AbstractSpan<?> span); void deactivate(AbstractSpan<?> span); MetricRegistry getMetricRegistry(); @Override void overrideServiceNameForClassLoader(@Nullable ClassLoader classLoader, @Nullable String serviceName); void resetServiceNameOverrides(); ApmServerClient getApmServerClient(); MetaData getMetaData(); ScheduledThreadPoolExecutor getSharedSingleThreadedPool();  }### Answer:
@Test void testPause() { tracerImpl.pause(); assertThat(tracerImpl.startRootTransaction(getClass().getClassLoader())).isNull(); }