For that, use the RTCPeerConnectionHandlerMock class
*** This bug has been marked as a duplicate of bug 124902 ***