Added test cases for the Dispatcher class, some of which moved from the Application and Router classes.