@Test public void testProbeInjectExplicitlyNamedProbeToField() { ProbeTest test = new ProbeTest(); probesConfiguration.addConfig("explicitProbeInjectedToField", ProbesType.THROUGHPUT.getName()); testContainer = createTestContainer(test); assertNotNull(test.fooProbe); assertTrue(testContainer.hasProbe("explicitProbeInjectedToField")); }
@Test public void testProbeInjectIntervalProbeToField() throws Exception { ProbeTest test = new ProbeTest(); probesConfiguration.addConfig("latencyProbe", ProbesType.LATENCY.getName()); testContainer = createTestContainer(test); assertNotNull(test.latencyProbe); assertTrue(testContainer.hasProbe("latencyProbe")); testContainer.invoke(TestPhase.RUN); Map<String, Result<?>> resultMap = testContainer.getProbeResults(); assertNotNull(resultMap); assertTrue(resultMap.keySet().contains("latencyProbe")); }