### Question:
MonitoredTransferManager implements TransferManager { @Override public void addUpload(Upload upload) { notifyListeners(upload); manager.addUpload(upload); } MonitoredTransferManager(TransferManager manager); @Override List<Transaction> getTransactions(); @Override void addUpload(Upload upload); @Override void addDownload(Download download); @Override List<Transaction> getHistory(); @Override void cleanup(); @Override void run(); void onAdd(Consumer<Transaction> consumer);  }### Answer:
@Test public void notifiesOnAddUpload() { Upload t = new UploadStub(); manager.addUpload(t); waitUntil(() -> !transactions.isEmpty()); assertSame(t, transactions.get(0)); }