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