Hard to test code is bad code; good code is easy to test. If writing a test is hard the effort should go to the code instead.