Features features = FeaturesHelper.addFeaturesElement(collection1);
features.addFeature(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
Collection collection2 = workspace.addCollection("a2", "a2");
collection2.setAccept("image/*");
Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
Collection[] collections = FeaturesHelper.select(service, s1);
assertEquals(1, collections.length);
assertEquals(collections[0], collection1);
Selector s2 = new AcceptSelector("image/png");
collections = FeaturesHelper.select(service, s2);
assertEquals(1, collections.length);
assertEquals(collections[0], collection2);
Selector s3 = new XPathSelector("f:features/f:feature[@ref='" + FeaturesHelper.FEATURE_SUPPORTS_DRAFTS + "']");
collections = FeaturesHelper.select(service, s3);
assertEquals(1, collections.length);
assertEquals(collections[0], collection1);