### Question:
FibonacciFitter { public static CustomFitter create(long maxBucketSize) { checkArgument(maxBucketSize > 0, "maxBucketSize must be greater than 0"); ImmutableSortedSet.Builder<Double> boundaries = ImmutableSortedSet.naturalOrder(); boundaries.add(Double.valueOf(0)); long i = 1; long j = 2; long k = 3; while (i <= maxBucketSize) { boundaries.add(Double.valueOf(i)); i = j; j = k; k = i + j; } return CustomFitter.create(boundaries.build()); } private  FibonacciFitter(); static CustomFitter create(long maxBucketSize);  }### Answer:
@Test public void testCreate_maxBucketSizeNegative_throwsException() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> FibonacciFitter.create(-1)); assertThat(e).hasMessageThat().isEqualTo("maxBucketSize must be greater than 0"); }
@Test public void testCreate_maxBucketSizeZero_throwsException() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> FibonacciFitter.create(0)); assertThat(e).hasMessageThat().isEqualTo("maxBucketSize must be greater than 0"); }
@Test public void testCreate_maxBucketSizeOne_createsTwoBoundaries() { assertThat(FibonacciFitter.create(1).boundaries()).containsExactly(0.0, 1.0).inOrder(); }
@Test public void testCreate_maxBucketSizeTwo_createsThreeBoundaries() { assertThat(FibonacciFitter.create(2).boundaries()).containsExactly(0.0, 1.0, 2.0).inOrder(); }
@Test public void testCreate_maxBucketSizeThree_createsFourBoundaries() { assertThat(FibonacciFitter.create(3).boundaries()) .containsExactly(0.0, 1.0, 2.0, 3.0) .inOrder(); }
@Test public void testCreate_maxBucketSizeFour_createsFourBoundaries() { assertThat(FibonacciFitter.create(4).boundaries()) .containsExactly(0.0, 1.0, 2.0, 3.0) .inOrder(); }
@Test public void testCreate_maxBucketSizeLarge_createsFibonacciSequenceBoundaries() { ImmutableList<Double> expectedBoundaries = ImmutableList.of( 0.0, 1.0, 2.0, 3.0, 5.0, 8.0, 13.0, 21.0, 34.0, 55.0, 89.0, 144.0, 233.0, 377.0, 610.0, 987.0); assertThat(FibonacciFitter.create(1000).boundaries()) .containsExactlyElementsIn(expectedBoundaries) .inOrder(); }