public synchronized void setSamples(final long samples) {
    if (samples < 0) {
      this.samples = 0;
    } else {
      this.samples = samples;
    }
  }
@Test
  public void testSetSamples() throws Throwable {
    MeanStatistic stat = tenFromOne.copy();
    stat.setSamples(10);
    Assertions.assertThat(stat)
        .isEqualTo(tenFromTen);
  }