### Question:
Script { public Filter toFilters() { try { List<Filter> filters = new LinkedList<>(); List<String> lines = Files.readAllLines(file.toPath()); for (String l : lines) { l = l.trim(); if (l.isEmpty()) continue; if (l.startsWith("#")) continue; Filter filter = Script.parse(l); filters.add(filter); } return new CompositeFilter(filters.toArray(new Filter[0])); } catch (IOException e) { e.printStackTrace(); return null; } } Script(File filepath); Filter toFilters(); static Filter parse(String text);  }### Answer:
@Test public void always_composite_filter() { Filter filter = script.toFilters(); assertTrue(filter instanceof CompositeFilter); CompositeFilter composite = (CompositeFilter) filter; assertTrue(composite.getFilters()[0] instanceof MarketCap); assertTrue(composite.getFilters()[1] instanceof CrossingMA); }