@Override
  public String toString() {
    return String.format("(samples=%d, sum=%d, mean=%.4f)",
        samples, sum, mean());
  }
@Test
  public void testNegativeSamplesAreEmpty() throws Throwable {
    MeanStatistic stat = new MeanStatistic(-10, 1);
    Assertions.assertThat(stat)
        .describedAs("stat with negative samples")
        .matches(MeanStatistic::isEmpty, "is empty")
        .isEqualTo(empty)
        .extracting(MeanStatistic::mean)
        .isEqualTo(ZEROD);
    Assertions.assertThat(stat.toString())
        .contains("0.0");

  }