[AS7-6334] Added expression rejection testing.

Added expression rejection testing. Some refactoring to cleanup the extension.