### Question:
SamlibOperation { public void makeAuthorRead(final Author author, final AuthorGuiState state) { mThread = new Thread() { @Override public void run() { super.run(); runAuthorRead(author, 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 testMakeAuthorRead() throws Exception { ArrayList<String> urls = new ArrayList<>(); urls.add(AUTHOR_URL); mSamlibOperation.runAuthorAdd(urls, authorGuiState); List<Author> aa = authorController.getAll(); assertEquals(1, aa.size()); Author author = aa.get(0); Book book = authorController.getBookController().getAll(author, bookOrder).get(10); Log.i(DEBUG_TAG, "testMakeAuthorRead: test gor book " + book.getTitle() + " - " + book.getUri()); authorController.getBookController().markUnRead(book); authorController.testMarkRead(author); book = authorController.getBookController().getById(book.getId()); GroupBook groupBook = authorController.getGroupBookController().getByBook(book); assertTrue(book.isIsNew()); assertEquals(1, groupBook.getNewNumber()); guiEventBus.getObservable().subscribe( guiUpdateObject -> { if (guiUpdateObject.isAuthor()) { mAuthor = (Author) guiUpdateObject.getObject(); myNotify(); } }, throwable -> { Log.e(DEBUG_TAG, "testMakeAuthorRead: onError ", throwable); myNotify(); }); mSamlibOperation.makeAuthorRead(author, authorGuiState); synchronized (monitor) { try { monitor.wait(); } catch (InterruptedException e) { Log.e(DEBUG_TAG, "testMakeAuthorRead: interrupted", e); } } author = authorController.getById(author.getId()); book = authorController.getBookController().getById(book.getId()); groupBook = authorController.getGroupBookController().getByBook(book); assertFalse(author.isIsNew()); assertFalse(book.isIsNew()); assertEquals(author.getId(), mAuthor.getId()); assertEquals(0, groupBook.getNewNumber()); }