Added tests and implementation for manipulating specs based on &, |, and ! operators.