title: spying function inside a function in a service, in controller test using jasmine
body: <p>let the service be</p>
  
  <pre><code>function testService(){
  
    function test(){
          return{
                find:find,
                save:save
          };
          function find(){
                //return a promise
          }
          function save(){
                //some code
          }
    }
  
    return {test:test};
  </code></pre>
  
  <p>}</p>
  
  <p>let the controller be</p>
  
  <pre><code>function TestController(testService){
    var ctrl=this;
    ctrl.first=first;
  
    function first(){
            testService.test().find().then(function(response){});
    }
  </code></pre>
  
  <p>}</p>
  
  <p>how can i mock the the service call in the 'first' function in controller using jasmine</p>