Test error detection