ClientClusterManagementService implements ClusterManagementService { @Override public <T extends AbstractConfiguration<?>> ClusterManagementRealizationResult delete( T config) { ClusterManagementRealizationResult result = transport.submitMessage(config, CommandType.DELETE); 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 deleteCallsSubmitMessageAndReturnsResult() { when(serviceTransport.submitMessage(any(), any())).thenReturn(successRealizationResult); ClusterManagementRealizationResult realizationResult = service.delete(configuration); assertThat(realizationResult).isSameAs(successRealizationResult); verify(serviceTransport).submitMessage(same(configuration), same(CommandType.DELETE)); }