added tests for Barrier.set