Issue #188: Setting expectations before connecting