Enhanced unittest to check route metadata and fix comparison bug.