Testing code for barrier.