improving test and refactoring to use expected rule
extracing instantiation of exception