Fixes tests to work with thread-safe methods.