@Test
public void shouldReturnFilteredFilters() {

    List<FilterMapping> filterMappings = new ArrayList<>();
    filterMappings.add(new FilterMappingImpl(Pattern.compile("^/secured/.*$"), null, FakeAbstractFilter.class));
    filterMappings.add(new FilterMappingImpl(Pattern.compile("^/secured/abc.*$"), null, FakeAbstractFilter.class));
    filterMappings.add(new FilterMappingImpl(Pattern.compile("^/demo/.*$"), null, FakeAbstractFilter.class));
    when(servletContext.getFilterMappings()).thenReturn(filterMappings);
    assertThat(servletContextHelper.getFilterMappingsForPath(servletContext, "/context/secured/abc"), hasSize(2));
}