Removed deprecated method for mocking, adjusted tests