add unit test to test exception throw BasicURLDispatcher