[Thread] check too large error code in unit tests
Per CTS review comment in aosp/2949385:
```
You might want to make this a bit larger, otherwise if some new error codes are added in the future in a mainline update, already released CTS test packages will start to fail.
That should be fixed by mCTS, but since mCTS is not in place yet, it's best to be safe
```
This commit moves the too-large error code check into unit test to avoid
potential CTS compatibility issues.
Bug: 323791003
Change-Id: If99191630e1044cb8f5ed189bf79567cd51c3905
2 files changed