public class Test1 { void foo() { if (Test.FIRST.invert() != Test.SECOND) { //assert } } }