Fix tests, add tests for affiliation

Modify study and command tests to expect new affiliation argument