Tests refactoring.
Negative test cases for references.