Got rid of deprecation warning in tests