#318 Adapt existing code to Behat tests