tests refactored in order not to use deprecated methods