Refactored unit test and failing test