SparseArrayBuilder { @NonNull @CheckResult public SparseArray<T> build() { return sparseArray; } SparseArrayBuilder();  SparseArrayBuilder(final int capacity);  SparseArrayBuilder(@NonNull final SparseArray<T> sparseArray); @CheckResult SparseArrayBuilder<T> put(final int key, final T value); @CheckResult SparseArrayBuilder<T> clear(); @NonNull @CheckResult SparseArray<T> build();  }
@Test public void constructorEmptyBuildShouldReturnEmpty() { final SparseArray<String> actual = new SparseArrayBuilder<String>().build(); final SparseArray<String> expected = new SparseArray<>(); assertSparseArrayEquals(expected, actual); }
@Test public void constructor0CapacityBuildShouldReturnEmpty() { final SparseArray<String> actual = new SparseArrayBuilder<String>(0).build(); final SparseArray<String> expected = new SparseArray<>(); assertSparseArrayEquals(expected, actual); }