The difficulty of testing the error path of
splitDateTime() and the fact that I could not figure out where the exception supposedly came from bothered me. It was time for an archeological expedition into the project’s history.
Searching back, I discovered that the error handling was added two years prior as part of a different function . I also noticed that the body of the
try block called a collaborator that was no longer involved in the present day code. About a year ago, it was refactored into its current function [e7c7d40], but the
try block still called the collaborator. Finally, I found the code from ten months ago that replaced the original implementation with the current one [b838a21]. The current code could ...