Use srand for testing.