@Test
public void testParseUserAgent() throws Exception {

	doReturn(true).when(servletPlugin).isParseUserAgent();
	final MockHttpServletRequest request = new MockHttpServletRequest("GET", "/test.js");
	request.addHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
	final MonitoredHttpRequest monitoredHttpRequest = createMonitoredHttpRequest(request);
	Span span = monitoredHttpRequest.createSpan();
	Scope scope = tracer.scopeManager().activate(span);
	span.finish();
	scope.close();
	assertEquals(1, tracer.finishedSpans().size());
	final MockSpan mockSpan = tracer.finishedSpans().get(0);
	assertThat(mockSpan.tags()).containsEntry("user_agent.browser", "Chrome");
}