Add tests for the beneficiaries error codes