Rename type method to route.
Add test case for router.