public synchronized MutableQuantiles newQuantiles(String name, String desc,
      String sampleName, String valueName, int interval) {
    checkMetricName(name);
    if (interval <= 0) {
      throw new MetricsException("Interval should be positive.  Value passed" +
          " is: " + interval);
    }
    MutableQuantiles ret =
        new MutableQuantiles(name, desc, sampleName, valueName, interval);
    metricsMap.put(name, ret);
    return ret;
  }
@Test
  public void testAddIllegalParameters() {
    final MetricsRegistry r = new MetricsRegistry("IllegalParamTest");

    expectMetricsException("Interval should be positive.  Value passed is: -20",
        new Runnable() {
      @Override
      public void run() {
          r.newQuantiles("q1", "New Quantile 1", "qq1", "qv1", (int)-20);
      }
    });
  }