public void foo() {
List<RelProvider> providers = Arrays.asList(new AnnotationRelProvider(), new DefaultRelProvider());
PluginRegistry<RelProvider, Class<?>> registry = OrderAwarePluginRegistry.create(providers);
RelProvider delegatingProvider = new DelegatingRelProvider(registry);
assertThat(delegatingProvider.supports(Sample.class), is(true));
assertThat(delegatingProvider.getItemResourceRelFor(Sample.class), is("foo"));
assertThat(delegatingProvider.getCollectionResourceRelFor(Sample.class), is("bar"));
assertThat(delegatingProvider.supports(String.class), is(true));
assertThat(delegatingProvider.getItemResourceRelFor(String.class), is("string"));
assertThat(delegatingProvider.getCollectionResourceRelFor(String.class), is("stringList"));
}