We may re-factor some of this into a discovery service. Unless a function needs to be a public interface method and thus attached to the `$scope`, I don't think we should do it just for the sake of testing. Curious question, if this controller had the following, would you still object despite it not modifying the "$scope":

    var discovery = $scope.discovery = {url: '"};

    setDiscoveryDetails = function(task) {
        discovery.url = task.parameters.url;
        discoveryTable.rows = transformRows(task.result);
        discovery.pending = task.pending;
    };