@Test public void listLocalBrokers_returnsBrokers() throws Exception { expect(clusterManager.getLocalCluster()).andReturn(CompletableFuture.completedFuture(CLUSTER)); replay(clusterManager); List<Broker> brokers = brokerManager.listLocalBrokers().get(); assertEquals(CLUSTER.getBrokers(), brokers); }
@Override public CompletableFuture<List<Broker>> listLocalBrokers() { return clusterManager.getLocalCluster().thenApply(Cluster::getBrokers); }
BrokerManagerImpl implements BrokerManager { @Override public CompletableFuture<List<Broker>> listLocalBrokers() { return clusterManager.getLocalCluster().thenApply(Cluster::getBrokers); } }
BrokerManagerImpl implements BrokerManager { @Override public CompletableFuture<List<Broker>> listLocalBrokers() { return clusterManager.getLocalCluster().thenApply(Cluster::getBrokers); } @Inject  BrokerManagerImpl(ClusterManager clusterManager); }
BrokerManagerImpl implements BrokerManager { @Override public CompletableFuture<List<Broker>> listLocalBrokers() { return clusterManager.getLocalCluster().thenApply(Cluster::getBrokers); } @Inject  BrokerManagerImpl(ClusterManager clusterManager); @Override CompletableFuture<List<Broker>> listBrokers(String clusterId); @Override CompletableFuture<Optional<Broker>> getBroker(String clusterId, int brokerId); @Override CompletableFuture<List<Broker>> listLocalBrokers(); }
BrokerManagerImpl implements BrokerManager { @Override public CompletableFuture<List<Broker>> listLocalBrokers() { return clusterManager.getLocalCluster().thenApply(Cluster::getBrokers); } @Inject  BrokerManagerImpl(ClusterManager clusterManager); @Override CompletableFuture<List<Broker>> listBrokers(String clusterId); @Override CompletableFuture<Optional<Broker>> getBroker(String clusterId, int brokerId); @Override CompletableFuture<List<Broker>> listLocalBrokers();  }