private static final Random random = new Random();
public static RemoteObject mockRemoteObject() {
RemoteObject serviceObject = createRemoteObject();
RemoteObject remoteObject = createRemoteObject();
ConnectionImpl connection = mock( ConnectionImpl.class );
when( connection.createRemoteObject( anyString() ) ).thenReturn( remoteObject );
when( connection.createServiceObject( anyString() ) ).thenReturn( serviceObject );
Fixture.fakeConnection( connection );
return remoteObject;
}