Unit Testing Angularjs Refactoring.