public void testSubResourceMethodSorting()
{
AbstractResourceDescriptor resource = new AbstractResourceDescriptorImpl(SampleResource2.class);
SubResourceMethodMap srmm = resource.getSubResourceMethods();
Collection<UriPattern> uris = srmm.keySet();
Iterator<UriPattern> i = uris.iterator();
// NOTE template will be normalized, first slash added
assertEquals("/b/c/d", i.next().getTemplate());
assertEquals("/b/c", i.next().getTemplate());
assertEquals("/b/{c}", i.next().getTemplate());