@Test void time_must_be_positive_or_zero() { assertThatIllegalArgumentException().isThrownBy(() -> Distance.ofMillis(-1)).withMessageContaining("(-1)"); assertThatCode(() -> Distance.ofMillis(0)).doesNotThrowAnyException(); }
public static Distance ofMillis(long millis) { return new Distance(millis); }
Distance { public static Distance ofMillis(long millis) { return new Distance(millis); } }
Distance { public static Distance ofMillis(long millis) { return new Distance(millis); } private  Distance(long millis); }
Distance { public static Distance ofMillis(long millis) { return new Distance(millis); } private  Distance(long millis); static Distance ofMillis(long millis); long millis(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Distance { public static Distance ofMillis(long millis) { return new Distance(millis); } private  Distance(long millis); static Distance ofMillis(long millis); long millis(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Distance ZERO; }