move parsing of routing patterns out of ApplicationRouter into a static method that can be unit tested more easily.