@Override
    public void add(String key, Number val, Context ctx) {
        metrics.computeIfAbsent(key, k -> new ConcurrentHashMap<>())
               .merge(MapContext.emptyIfNull(ctx).dimensions, val.doubleValue(), Double::sum);
    }
Metric implementation for tests.

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