@Test
public void testTakeSnapshot() throws InterruptedException {

	CoalescedPipe<String> coalescedPipe = new CoalescedPipe<>();
	Object[] snapShot = coalescedPipe.takeSnapshot();
	Assert.assertEquals(Arrays.toString(snapShot), 0, snapShot.length);
	coalescedPipe.put("test1");
	snapShot = coalescedPipe.takeSnapshot();
	Assert.assertEquals(Arrays.toString(snapShot), 1, snapShot.length);
	Assert.assertEquals("test1", snapShot[0]);
	coalescedPipe.put("test2");
	snapShot = coalescedPipe.takeSnapshot();
	Assert.assertEquals(Arrays.toString(snapShot), 2, snapShot.length);
	Assert.assertEquals("test1", snapShot[0]);
	Assert.assertEquals("test2", snapShot[1]);
}