Fix a busted unit test and a code analysis violation.