Eliminate deprecation warnings in unit tests