Added tests for testing a route via function.