ClientClusterManagementService implements ClusterManagementService { @Override public <A extends ClusterManagementOperation<V>, V extends OperationResult> ClusterManagementOperationResult<A, V> start( A op) { ClusterManagementOperationResult<A, V> result = transport.submitMessageForStart(op); assertSuccessful(result); return result; } ClientClusterManagementService(ClusterManagementServiceTransport transport); @Override ClusterManagementRealizationResult create(T config); @Override ClusterManagementRealizationResult delete(
      T config); @Override ClusterManagementRealizationResult update(
      T config); @Override ClusterManagementListResult<T, R> list(
      T config); @Override ClusterManagementGetResult<T, R> get(
      T config); @Override ClusterManagementOperationResult<A, V> start(
      A op); @Override ClusterManagementOperationResult<A, V> get(
      A opType, String opId); @Override CompletableFuture<ClusterManagementOperationResult<A, V>> getFuture(
      A opType, String opId); @Override ClusterManagementListOperationsResult<A, V> list(
      A opType); @Override boolean isConnected(); @Override void close();  }
@Test public void startCallsSubmitMessageAndReturnsResult() { RebalanceOperation rebalanceOperation = new RebalanceOperation(); doReturn(successOperationResult).when(serviceTransport) .submitMessageForStart(any(RebalanceOperation.class)); ClusterManagementOperationResult<RebalanceOperation, RebalanceResult> operationResult = service.start(rebalanceOperation); assertThat(operationResult).isSameAs(successOperationResult); }