Fixed some mistakes causing unit test failures and update API tests to use UnitTestHelper constants to refer to Proto classes. Part of #916