### Question:
BuildDAOImpl implements BuildDAO { List<String> parseNoteListing(String data) { List<String> notes = new ArrayList<String>(); Scanner s = new Scanner(data); s.useDelimiter("\\n"); String row; Pattern p = Pattern.compile("magrit:built-by ([0-9a-f]{40})"); while (s.hasNext()) { row = s.next(); Matcher matcher = p.matcher(row); if (matcher.matches()) { notes.add(matcher.group(1)); } } return notes; } @Inject  BuildDAOImpl(GitUtils gitUtils, TimeService timeService); @Override BuildResult getLast(Repository repo, String sha1); @Override List<BuildResult> getAll(Repository repo, String sha1); @Override void save(BuildResult buildResult, Repository repo, String userName, Pair<Long,Integer> when);  }### Answer:
@Test public void testParseNoteListing() throws Exception { String data = "magrit:built-by 1234000000000000000000000000000000000000\n\nmagrit:built-by 5678000000000000000000000000000000000000\n"; List<String> notes = dao.parseNoteListing(data); assertThat(notes) .isNotNull() .hasSize(2) .containsSequence("1234000000000000000000000000000000000000", "5678000000000000000000000000000000000000"); }