WaitAvailableBrowsersChecker implements AvailableBrowsersChecker { public WaitAvailableBrowsersChecker() { } WaitAvailableBrowsersChecker();  WaitAvailableBrowsersChecker(int queueTimeout, int queueWaitInterval, StatsCounter statsCounter); @Override void ensureFreeBrowsersAvailable(String user, String remoteHost, String browser, Version version);  }
@Test public void testWaitAvailableBrowsersChecker() throws Exception { Temporal started = now(); try { checker.ensureFreeBrowsersAvailable("user", "host", "firefox", version); } catch (WaitAvailableBrowserTimeoutException e) { } verify(counter, times(3)).getSessionsCountForUserAndBrowser(eq("user"), eq("firefox"), eq("33")); assertThat(Duration.between(started, now()).toMillis(), greaterThanOrEqualTo(3000L)); }