Need to refactor tests