It would be better to use a spy here, so that the function will be reset at the end of this test.
```
spyOn(server, 'selfAssess').andCallFake(function(submissionId, optionsSelected) {
...
});
```