Add getStats unit test

Since some Telemetry data depends on `getStats`, having a unit test should make it more difficult to accidentally break this without noticing.