@Test public void controllers() throws Exception { controller.controllers().toCompletableFuture().get(); }
public CompletionStage<Set<LobbyController>> controllers() { return lobbies() .thenApply(lobbies -> lobbies.stream() .map(lobby -> new LobbyController(client, mapper, lobby.getId())) .collect(Collectors.toSet()) ); }
LobbyBalancerController { public CompletionStage<Set<LobbyController>> controllers() { return lobbies() .thenApply(lobbies -> lobbies.stream() .map(lobby -> new LobbyController(client, mapper, lobby.getId())) .collect(Collectors.toSet()) ); } }
LobbyBalancerController { public CompletionStage<Set<LobbyController>> controllers() { return lobbies() .thenApply(lobbies -> lobbies.stream() .map(lobby -> new LobbyController(client, mapper, lobby.getId())) .collect(Collectors.toSet()) ); } LobbyBalancerController(Client client); }
LobbyBalancerController { public CompletionStage<Set<LobbyController>> controllers() { return lobbies() .thenApply(lobbies -> lobbies.stream() .map(lobby -> new LobbyController(client, mapper, lobby.getId())) .collect(Collectors.toSet()) ); } LobbyBalancerController(Client client); CompletionStage<Set<Lobby>> lobbies(); CompletionStage<Set<LobbyController>> controllers(); CompletionStage<Lobby> lobby(String id); CompletionStage<LobbyController> controller(String id); LobbyController controller(Lobby lobby); CompletionStage<LobbyController> find(); }
LobbyBalancerController { public CompletionStage<Set<LobbyController>> controllers() { return lobbies() .thenApply(lobbies -> lobbies.stream() .map(lobby -> new LobbyController(client, mapper, lobby.getId())) .collect(Collectors.toSet()) ); } LobbyBalancerController(Client client); CompletionStage<Set<Lobby>> lobbies(); CompletionStage<Set<LobbyController>> controllers(); CompletionStage<Lobby> lobby(String id); CompletionStage<LobbyController> controller(String id); LobbyController controller(Lobby lobby); CompletionStage<LobbyController> find();  }