### Question:
DirectIoTransactionEditor extends Configured { public List<TransactionInfo> list() throws IOException { LOG.info("Start listing Direct I/O transactions"); List<FileStatus> list = new ArrayList<>(HadoopDataSourceUtil.findAllTransactionInfoFiles(getConf())); if (list.isEmpty()) { LOG.info("There are no Direct I/O transactions"); return Collections.emptyList(); } Collections.sort(list, (o1, o2) -> Long.compare(o1.getModificationTime(), o2.getModificationTime())); LOG.info(MessageFormat.format( "Start extracting {0} Direct I/O commit information", list.size())); List<TransactionInfo> results = new ArrayList<>(); for (FileStatus stat : list) { TransactionInfo commitObject = toInfoObject(stat); if (commitObject != null) { results.add(commitObject); } } LOG.info("Finish listing Direct I/O transactions"); return results; } DirectIoTransactionEditor();  DirectIoTransactionEditor(DirectDataSourceRepository repository); TransactionInfo get(String executionId); List<TransactionInfo> list(); boolean apply(String executionId); boolean abort(String executionId);  }### Answer:
@Test public void list() throws Exception { indoubt("ex1"); indoubt("ex2"); indoubt("ex3"); List<TransactionInfo> c1 = testee.list(); assertThat(c1.size(), is(3)); get(c1, "ex1"); get(c1, "ex2"); get(c1, "ex3"); testee.apply("ex2"); List<TransactionInfo> c2 = testee.list(); assertThat(c2.size(), is(2)); get(c1, "ex1"); get(c1, "ex3"); testee.apply("ex1"); List<TransactionInfo> c3 = testee.list(); assertThat(c3.size(), is(1)); get(c1, "ex3"); testee.apply("ex3"); List<TransactionInfo> c4 = testee.list(); assertThat(c4.size(), is(0)); }