### Question:
BuildDAOImpl implements BuildDAO { @Override public List<BuildResult> getAll(Repository repo, String sha1) { List<BuildResult> results = new ArrayList<BuildResult>(); Note note = readNote(repo, sha1); if (note == null) return Collections.emptyList(); try { List<String> sha1s = parseNoteListing(gitUtils.show(repo, note.getData().getName())); if (sha1s.size() == 0) { return results; } for (String noteItem : sha1s) { String data = gitUtils.show(repo, noteItem); results.add(0, parseNote(repo, sha1, data)); } } catch (AmbiguousObjectException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return results; } @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 testGetAll() throws Exception { dao = new BuildDAOImpl(new GitUtils(), time); List<BuildResult> results = dao.getAll(test, "7dec669f77b48e6420785e523e71e461ba58dc72"); assertThat(results).hasSize(2); assertThat(results.get(0).getExitCode()).isEqualTo(0); assertThat(results.get(1).getExitCode()).isEqualTo(1); }