### Question:
ClickClassByText extends ActionWithJSPreconditionBase { @Override public String getJSEventToWaitFor() { return MessageFormat.format("{0} {1} {2}", CLICK_CLASS_BY_TEXT, initialCollectorClass, text); } ClickClassByText(String initialCollectorClass,
                            String text,
                            boolean expectsHttpRequest,
                            SearchContextFunction contextProvider); @Override void executeAfterJSPreconditionHasBeenSatisfied(WebDriver driver,
                                                           ReplayingState state,
                                                           Function<SearchContext, SearchContext> contextProvider); @Override boolean expectsHttpRequest(); @Override String getJSEventToWaitFor();  }### Answer:
@Test public void jsWaitingEventIsConstructedCorrectly() { SearchContextFunction contextProvider = webDriver1 -> webDriver1; ClickClassByText clickClassByText = new ClickClassByText(initialCollectorClass, text, expectsHttp, contextProvider); String expected = CLICK_CLASS_BY_TEXT + " " + initialCollectorClass + " " + text; String actual = clickClassByText.getJSEventToWaitFor(); assertEquals(expected, actual); }