Abstract 'rest' function for tests

Start to fill in Buckets route tests a bit