Helper for tests.