@Test
public void publish() {

	final SampleBuffer<Double> buffer = new SampleBuffer<>(33);
	for (int i = 0; i < 10; ++i) {
		buffer.add(Sample.ofDouble(i, 2*i));
	}
	buffer.publish();
	Assert.assertEquals(
		buffer.samples().stream()
			.map(p -> p.argAt(0).intValue())
			.collect(Collectors.toList()),
		List.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
	);
}