Factored out the test.