Endpoint tests with declared rules

This patch adds a test for endpoints where the rules are defined outside
of the decorator and referenced in the decorator