Add getStats unit test

Since some Telemetry data depends on `getStats`, having a unit test should make it more diffucult to accidentally break this without noticing.
Merge pull request #5248 from Snuffleupagus/getStats-unit-test

Add getStats unit test