I'm fine with a coding test, and okay with whiteboarding / live-coding so long as people are accepting of it just being roughing-out the code rather than expecting to produce something polished... but 5 hours of it? That's ridiculious unless you're paying people for the interview.