Refactored test and added one