Convoluted but necessary testing.