### Question:
SamlibOperation { public void makeGroupReadFlip(final GroupBook groupBook, final BookGuiState bState, final AuthorGuiState aState) { mThread = new Thread() { @Override public void run() { super.run(); runGroupReadFlip(groupBook, bState, aState); } }; 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 testMakeGroupReadFlip() 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, "testMakeGroupReadFlip: 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.isGroup()) { mGroupBook = (GroupBook) guiUpdateObject.getObject(); myNotify(); } }, throwable -> { Log.e(DEBUG_TAG, "testMakeGroupReadFlip: error", throwable); myNotify(); } ); mSamlibOperation.makeGroupReadFlip(groupBook, new BookGuiState(author.getId(), bookOrder), null); synchronized (monitor) { try { monitor.wait(); } catch (InterruptedException e) { Log.e(DEBUG_TAG, "testMakeBookReadFlip: interrupted", e); } } assertEquals(0, mGroupBook.getNewNumber()); }