/**
   * Obtain the UUID of some relatively underutilized data service.
   *
   * <p>FIXME The LBS should interpret the excludedServiceUUID as the source service UUID and then
   * provide a list of those services having an LBS computed service score which is significantly
   * lower than the score for this service. Changing this will break some unit tests (for the LBS
   * behavior).
   */
  private UUID getMoveTarget(
      final UUID sourceServiceUUID, final ILoadBalancerService loadBalancerService) {

    try {

      // request under utilized data service UUIDs (RMI).
      final UUID[] uuids =
          loadBalancerService.getUnderUtilizedDataServices( //
              0, // minCount - no lower bound.
              1, // maxCount - no upper bound.
              sourceServiceUUID // exclude this data service.
              );

      if (uuids != null && uuids.length > 0) {

        // Found a move target.
        return uuids[0];
      }

      // No move target.
      return null;

    } catch (TimeoutException t) {

      log.warn(t.getMessage());

      return null;

    } catch (InterruptedException t) {

      log.warn(t.getMessage());

      return null;

    } catch (Throwable t) {

      log.error("Could not obtain target service UUIDs: ", t);

      return null;
    }
  }