def METHOD_NAME(self):
    # Test an empty route handler
    emptyResource = Resource()
    self.assertRaises(GirderException, emptyResource.handleRoute, 'GET', (), {})
    dummy = DummyResource()
    # Bad route should give a useful exception.
    exc = None
    try:
        dummy.handleRoute('GET', (), {})
    except RestException as e:
        exc = str(e)
    self.assertEqual(exc, 'No matching route for "GET "')
    # Make sure route ordering is correct; literals before wildcard tokens
    r = dummy.handleRoute('GET', ('literal1', 'foo'), {})
    self.assertEqual(r, {'wc1': 'literal1', 'wc2': 'foo', 'params': {}})
    r = dummy.handleRoute('GET', ('literal1', 'literal2'), {})
    self.assertEqual(r, {'params': {}})
    r = dummy.handleRoute('PATCH', ('guid', 'patchy'), {})
    self.assertEqual(r, {'id': 'guid', 'params': {}})
    # Add a new route with a new method
    dummy.route('DUMMY', (':id', 'dummy'), dummy.handler)
    r = dummy.handleRoute('DUMMY', ('guid', 'dummy'), {})
    self.assertEqual(r, {'id': 'guid', 'params': {}})
    # Test getting the route handler
    self.assertRaises(Exception, dummy.getRouteHandler, 'FOO', (':id', 'dummy'))
    self.assertRaises(Exception, dummy.getRouteHandler, 'DUMMY', (':id', 'foo'))
    registeredHandler = dummy.getRouteHandler('DUMMY', (':id', 'dummy'))
    # The handler method cannot be compared directly with `is`, but its name and behavior can be
    # examined
    self.assertEqual(registeredHandler.__name__, dummy.handler.__name__)
    self.assertEqual(registeredHandler(foo=42), {'foo': 42})
    # Now remove the route
    dummy.removeRoute('DUMMY', (':id', 'dummy'))
    self.assertRaises(RestException, dummy.handleRoute, 'DUMMY', ('guid', 'dummy'), {})