Refactoring test to use exmaples