ServersChecker { public void checkOnce(Consumer<String> readyHandler) throws InfrastructureException { for (ServerChecker checker : getServerCheckers()) { checker.checkOnce(readyHandler); } } @Inject  ServersChecker(
      @Assisted RuntimeIdentity runtimeIdentity,
      @Assisted String machineName,
      @Assisted Map<String, ? extends Server> servers,
      MachineTokenProvider machineTokenProvider,
      @Named("che.workspace.server.ping_success_threshold") int serverPingSuccessThreshold,
      @Named("che.workspace.server.ping_interval_milliseconds") long serverPingInterval,
      @Named("che.workspace.server.liveness_probes") String[] livenessProbes); CompletableFuture<?> startAsync(Consumer<String> serverReadinessHandler); void checkOnce(Consumer<String> readyHandler); void await();  }
@Test( expectedExceptions = InfrastructureException.class, expectedExceptionsMessageRegExp = "oops!") public void throwsExceptionIfAnyServerIsNotAvailable() throws InfrastructureException { doThrow(new InfrastructureException("oops!")).when(connectionChecker).checkOnce(any()); checker.checkOnce(ref -> {}); }