test .invert method