### Question:
StudentDatabase { public List<StudentRecord> filter(IFilter filter) { Objects.requireNonNull(filter); List<StudentRecord> filtered = new LinkedList<>(); for (StudentRecord studentRecord : listOfStudents) { if (filter.accepts(studentRecord)) { filtered.add(studentRecord); } } return filtered; } StudentDatabase(List<String> lines); StudentRecord forJMBAG(String jmbag); List<StudentRecord> filter(IFilter filter);  }### Answer:
@Test void testFilterReturnsAll() { StudentDatabase database = getDatabase(); List<StudentRecord> allStudents = database.filter(ALL); assertEquals(63, allStudents.size()); }
@Test void testFilterReturnsNone() { StudentDatabase database = getDatabase(); List<StudentRecord> emptyList = database.filter(NONE); assertEquals(0, emptyList.size()); assertTrue(emptyList.isEmpty()); }