Only `isUnitTestDeclaration()` is not enough. Sometimes it will return `null` where `symbol->unittest` won't. If I recall correctly that happens when an UDA is attached to a unit test.