refactor route compiler
updated route compiler test case