private static MapContext emptyIfNull(Context context) {
            return context == null ? empty : (MapContext) context;
        }
Metric implementation for tests.

@author jonmv
jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java