### Question:
SamlibOperation { public void makeAuthorAdd(final ArrayList<String> urls, final AuthorGuiState state) { mThread = new Thread() { @Override public void run() { super.run(); runAuthorAdd(urls, state); } }; mThread.start(); } SamlibOperation(AuthorController sql, AbstractSettings settingsHelper, HttpClientController httpClientController, GuiEventBus guiEventBus); void makeBookReadFlip(final Book book, final BookGuiState bState, final AuthorGuiState aState); void makeGroupReadFlip(final GroupBook groupBook, final BookGuiState bState, final AuthorGuiState aState); void makeAuthorRead(final Author author, final AuthorGuiState state); void makeAuthorDel(final Author author, final AuthorGuiState state); void makeAuthorAdd(final ArrayList<String> urls, final AuthorGuiState state); void makeUpdateTags(final AuthorGuiState state); void makeGroupReload(final GroupBook groupBook, final BookGuiState state); void makeBookReload(final Book book, final BookGuiState state); void makeAuthorReload(final Author author, final AuthorGuiState state); static final long SLEEP_INTERVAL_SECONDS; static final int SLEEP_DELAY_MIN; static final int SLEEP_DELAY_MAX; }### Answer:
@Test(timeout = TIMEOUT) public void testMakeAuthorAdd() throws Exception { guiEventBus.getObservable().subscribe( guiUpdateObject -> { if (guiUpdateObject.isResult()) { mResult = (Result) guiUpdateObject.getObject(); myNotify(); } }, throwable -> { Log.e(DEBUG_TAG,"testMakeAuthorAdd: error",throwable); myNotify(); }); ArrayList<String> urls = new ArrayList<>(); urls.add(AUTHOR_URL); mSamlibOperation.makeAuthorAdd(urls, authorGuiState); synchronized (monitor) { try { monitor.wait(); } catch (InterruptedException e) { Log.e(DEBUG_TAG, "testMakeAuthorAdd: interrupted", e); } } assertEquals(0, mResult.doubleAdd); assertEquals(1, mResult.numberOfAdded); assertEquals(1, authorController.getAll().size()); }