@Test
public void testConvertWeaselBeaconToSpan_skipsTagProcessorsIfSpanIsNotSampled() throws ServletException, IOException {

	// Given
	when(tracingPlugin.isSampled(any())).thenReturn(false);
	MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest();
	mockHttpServletRequest.setParameter("ty", "pl");
	mockHttpServletRequest.setParameter("r", "1496751574200");
	mockHttpServletRequest.setParameter("u", "http://localhost:9966/petclinic/");
	mockHttpServletRequest.setParameter("m_user", "tom.mason@example.com");
	mockHttpServletRequest.setParameter("ts", "-197");
	mockHttpServletRequest.setParameter("d", "518");
	mockHttpServletRequest.setParameter("t_unl", "0");
	mockHttpServletRequest.setParameter("t_red", "0");
	mockHttpServletRequest.setParameter("t_apc", "5");
	mockHttpServletRequest.setParameter("t_dns", "0");
	mockHttpServletRequest.setParameter("t_tcp", "0");
	mockHttpServletRequest.setParameter("t_ssl", "0");
	mockHttpServletRequest.setParameter("t_req", "38");
	mockHttpServletRequest.setParameter("t_rsp", "4");
	mockHttpServletRequest.setParameter("t_pro", "471");
	mockHttpServletRequest.setParameter("t_loa", "5");
	mockHttpServletRequest.setParameter("t_fp", "151");
	// When
	servlet.doPost(mockHttpServletRequest, new MockHttpServletResponse());
	// Then
	assertSoftly(softly -> {
		final List<MockSpan> finishedSpans = mockTracer.finishedSpans();
		softly.assertThat(finishedSpans).hasSize(1);
		MockSpan span = finishedSpans.get(0);
		softly.assertThat(span.tags())
				.containsEntry("type", "pageload")
				.doesNotContainKeys(TIMING_UNLOAD, TIMING_REDIRECT, TIMING_APP_CACHE_LOOKUP, TIMING_DNS_LOOKUP,
						TIMING_TCP, TIMING_REQUEST, TIMING_RESPONSE, TIMING_PROCESSING, TIMING_LOAD,
						TIMING_TIME_TO_FIRST_PAINT, TIMING_RESOURCE);
	});
}