title: Stubbing byId() in SAPUI5-sinon
body: <p>I'm filddling with sinonjs in SAPUI5. But there are some things I can't get my head around.</p>
  
  <pre><code>        QUnit.module("Validation of Betaalwijze", {
          beforeEach : function () {
              this.oMainViewController = new MainViewController();
              this.oViewStub = new ManagedObject();
  
              var data = {
              IBANPrimair: "123",
              IBANSecundair: "456",
              Betaalwijze: ""
              };
              var oModel = new JSONModel(data);
  
              var fakeBetaalwijzeField = new Input();
  
              sinon.stub(this.oViewStub, "getModel").returns(oModel);
              sinon.stub(this.oViewStub, "byId").returns(fakeBetaalwijzeField); 
              sinon.stub(this.oMainViewController, "getView").returns(this.oViewStub);
          },
  
          afterEach : function() {
              this.oMainViewController.destroy();
              this.oViewStub.destroy();
              this.fakeBetaalwijzeField.destroy();
          }   
      });
  
      QUnit.test("Should set an ValueState Error", function (assert) {
          // Arrange
          //All preparation here above.
  
  
          // Act
          this.oMainViewController._validateInput();
  
          // Assert
          //TODO
      });
  </code></pre>
  
  <p>The getModel-stub works nicely when I use a "sap/ui/base/ManagedObject" for the oViewStub. But the byId-stub causes the message "Attempted to wrap undefined property byId as function" in that case.
  When I use a "sap/ui/core/mvc/View" for the oViewStub, the getModel-stub is not found. (But this gives an error in the beforeEach also: Cannot read property 'viewData' of undefined.)</p>
  
  <p>What is the right way to stub the View and it's methods getModel() and byId()?</p>