### Question:
FilterUtil { public static final OpenAPI applyFilter(OASFilter filter, OpenAPI model) { filterComponents(filter, model.getComponents()); filterPaths(filter, model.getPaths()); filterServers(filter, model.getServers()); filterTags(filter, model.getTags()); filter.filterOpenAPI(model); return model; } private  FilterUtil(); static final OpenAPI applyFilter(OASFilter filter, OpenAPI model);  }### Answer:
@Test public void testApplyFilter() throws Exception { URL beforeUrl = FilterUtilTest.class.getResource("filter-before.json"); URL afterUrl = FilterUtilTest.class.getResource("filter-after.json"); OpenAPI model = OpenApiParser.parse(beforeUrl); OASFilter filter = filter(); model = FilterUtil.applyFilter(filter, model); String actual = OpenApiSerializer.serialize(model, Format.JSON); String expected = loadResource(afterUrl); assertJsonEquals(expected, actual); }