Fixed deprecated call in test.