Ah yes, the classic "my tests pass in isolation" syndrome. The soldier in camo is proudly directing deadly weapons away from the sleeping person, congratulating himself on his amazing unit tests. Meanwhile, production code is getting absolutely shredded by edge cases that the tests never bothered to check for. Sure, your function works great when you pass it exactly what you expect... shame users don't read your mind and follow your undocumented assumptions.