@Test
public void add() {

	final int size = 1_000_000;
	final Random random = new Random(12349);
	final List<Double> numbers = new ArrayList<>(size);
	for (int i = 1; i <= size; ++i) {
		numbers.add(random.nextDouble()*i*1_000_000);
	}
	final DoubleAdder adder = new DoubleAdder();
	numbers.forEach(adder::add);
	final double expectedSum = numbers.stream()
		.collect(summarizingDouble(Double::doubleValue))
		.getSum();
	Assert.assertEquals(adder.doubleValue(), expectedSum);
}