Added tests to expose flaw in mocking byref methods.  Implemented fix