title: How to stub an async database call with sinon
body: <p>I am trying to unit test the <code>getAll</code> method on this class: </p>
  
  <pre><code>module.exports = class BookController {
    static async getAll() {
      return await Book.query()
        .eager('reviews');
    }
  };
  </code></pre>
  
  <p>Book is a Objection model.</p>
  
  <p>How I'd like to test it is I want to fake the response from <code>Book.query().eager()</code> with my own data, since I can never verify what's in the database. For it to be a true unit test, should I just be testing that the <code>Book.query()</code> method is called?  Or should I be testing that the returned data since that's the contract of the <code>getAll()</code> method? I'm really unsure how I should be stubbing this out.</p>