Add test case for MetricBuilder.cachedGauge