@Test
public void testName() throws Exception {

  when(request.getRequestURI()).thenReturn("/onramp/v1/roads/road1/messages");
  when(request.getHeader("User-Agent")).thenReturn("product1/1.0 product2/2.0 product3/3.0");
  Set<String> products = new HashSet<>(Arrays.asList("product1", "product2", "product4"));
  Filter underTest = new UserAgentMetricFilter(registry, products);
  underTest.doFilter(request, response, chain);
  assertThat(counter1.count(), is(1.0));
  assertThat(counter2.count(), is(1.0));
  assertThat(counter3.count(), is(0.0));
  assertThat(counter4.count(), is(0.0));
  verify(chain).doFilter(request, response);
}