ProfilerModule implements Module { @Override public void start() { logger.info("profiler module start."); registPointCut(); if (traceContext.getConfig().read(enable_orientdb, default_enable_orientdb)) { embeddedServer = new OrientDBEmbedServer(traceContext.getConfig()); embeddedServer.startup(); } Module module = new TraceRepositoryModule(traceRepository, new RepositoryExecutor(traceContext.getConfig()), queue); module.start(); addTransformer(instrumentation.isRetransformClassesSupported()); } ProfilerModule(Instrumentation instrumentation); @Override void start(); @Override void stop();  }
@Test public void testStart() { Instrumentation instrumentation = mock(Instrumentation.class); TraceRegisterBinder traceRegisterBinder = mock(TraceRegisterBinder.class); TraceContext traceContext = mock(TraceContext.class); when(traceRegisterBinder.getTraceRegistryAdaptor()).thenReturn(new DefaultTraceRegistryAdaptor()); Module module = new ProfilerModule(instrumentation); module.start(); module.stop(); }