Common RPC class, based on Stream + test mockup