@Test public void testCreateWithProvidedTracerCloseProvider() { Tracer mock = Mockito.mock(Tracer.class); JmsTracer jmsTracerDontClose = OpenTracingTracerFactory.create(mock, false); Mockito.verifyNoInteractions(mock); jmsTracerDontClose.close(); Mockito.verifyNoInteractions(mock); JmsTracer jmsTracerClose = OpenTracingTracerFactory.create(mock, true); Mockito.verifyNoInteractions(mock); jmsTracerClose.close(); Mockito.verify(mock).close(); Mockito.verifyNoMoreInteractions(mock); }
public static JmsTracer create(Tracer tracer) { return create(tracer, false); }
OpenTracingTracerFactory extends JmsTracerFactory { public static JmsTracer create(Tracer tracer) { return create(tracer, false); } }
OpenTracingTracerFactory extends JmsTracerFactory { public static JmsTracer create(Tracer tracer) { return create(tracer, false); }  }
OpenTracingTracerFactory extends JmsTracerFactory { public static JmsTracer create(Tracer tracer) { return create(tracer, false); }  static JmsTracer create(Tracer tracer); static JmsTracer create(Tracer tracer, boolean closeUnderlyingTracer); @Override JmsTracer createTracer(URI remoteURI, String name); }
OpenTracingTracerFactory extends JmsTracerFactory { public static JmsTracer create(Tracer tracer) { return create(tracer, false); }  static JmsTracer create(Tracer tracer); static JmsTracer create(Tracer tracer, boolean closeUnderlyingTracer); @Override JmsTracer createTracer(URI remoteURI, String name);  }