Add tests for the use of negotiator

Fixes #829