### Question:
CustomFitter implements DistributionFitter { public static CustomFitter create(ImmutableSet<Double> boundaries) { checkArgument(boundaries.size() > 0, "boundaries must not be empty"); checkArgument(Ordering.natural().isOrdered(boundaries), "boundaries must be sorted"); for (Double d : boundaries) { checkDouble(d); } return new AutoValue_CustomFitter(ImmutableSortedSet.copyOf(boundaries)); }  static CustomFitter create(ImmutableSet<Double> boundaries); @Override abstract ImmutableSortedSet<Double> boundaries();  }### Answer:
@Test public void testCreateCustomFitter_emptyBounds_throwsException() throws Exception { IllegalArgumentException thrown = assertThrows( IllegalArgumentException.class, () -> CustomFitter.create(ImmutableSet.<Double>of())); assertThat(thrown).hasMessageThat().contains("boundaries must not be empty"); }
@Test public void testCreateCustomFitter_outOfOrderBounds_throwsException() throws Exception { IllegalArgumentException thrown = assertThrows( IllegalArgumentException.class, () -> CustomFitter.create(ImmutableSet.of(2.0, 0.0))); assertThat(thrown).hasMessageThat().contains("boundaries must be sorted"); }