### Question:
StudentDatabase { public StudentRecord forJMBAG(String jmbag) { return database.get(jmbag); } StudentDatabase(List<String> lines); StudentRecord forJMBAG(String jmbag); List<StudentRecord> filter(IFilter filter);  }### Answer:
@Test void testForJmbagWithValidJmbag() { StudentDatabase database = getDatabase(); StudentRecord record = database.forJMBAG("0000000001"); assertEquals("0000000001", record.getJmbag()); assertEquals("Marin", record.getFirstName()); assertEquals("Akšamović", record.getLastName()); assertEquals(2, record.getFinalGrade()); assertEquals(new StudentRecord("0000000001", "Not", "Important", 1), record); }
@Test void testForJmbagWithInvalidJmbag() { StudentDatabase database = getDatabase(); assertNull(database.forJMBAG("invalid")); assertNull(database.forJMBAG(null)); }