void put(Sample x) {
        UntypedMetric value = get(x);
        Measurement m = x.getMeasurement();
        switch (x.getMetricType()) {
            case GAUGE:
                value.put(m.getMagnitude());
                break;
            case COUNTER:
                value.add(m.getMagnitude());
                break;
            default:
                throw new IllegalArgumentException("Unsupported metric type: " + x.getMetricType());
        }
    }
@Test
    final void testPutSampleWithUnsupportedType() {
        boolean caughtIt = false;
        try {
            bucket.put(new Sample(new Measurement(1), new Identifier("nalle", null), AssumedType.NONE));
        } catch (Exception e) {
            caughtIt = true;
        }
        assertTrue(caughtIt);
    }