### Question:
LocalRepository extends AbstractRepository { public Result getResult(String location, String id) { Result result = new Result(); result.setLocation(location); result.setId(id); File folder = new File(root.getAbsolutePath() + BAR + location); if (folder.exists() && folder.isDirectory()) { File detail = new File(folder.getAbsolutePath() + BAR + id + ".txt"); if (detail.exists() && detail.isFile()) { result.setDetail(FileUtils.readFile(detail)); result.setFile(getFile(location, id)); return result; } } return null; } LocalRepository(); void clean(); List<Result> getResulstByLocation(String location); void save(Result result); Result getResult(String location, String id); List<String> getLocations(); int countResults();  }### Answer:
@Test public void testGetResult() { repo.save(new Result("r1", "ubuntu/chrome", "Ok1")); repo.save(new Result("r2", "ubuntu/chrome", "Ok2")); repo.save(new Result("r3", "ubuntu/chrome", "Ok3")); Result result = repo.getResult("ubuntu/chrome", "r2"); assertEquals("r2", result.getId()); assertEquals("Ok2", result.getDetail()); assertNull(result.getFile()); }