Add a unit test for Misc::translateErrorCode()