test examples with barriers