public void testRepositoryContent() throws Exception {
RepositoryAdminImpl repoAdmin = createRepositoryAdmin();
URL url = getClass().getResource("/another_repository.xml");
repoAdmin.addRepository(url);
Repository repo = new OSGiRepositoryImpl(repoAdmin);
Requirement req = new OSGiRequirementImpl("osgi.wiring.package",
"(&(osgi.wiring.package=org.apache.commons.logging)(version>=1.0.1)(!(version>=2)))");
Map<Requirement, Collection<Capability>> result = repo.findProviders(Collections.singleton(req));
assertEquals(1, result.size());
Collection<Capability> caps = result.values().iterator().next();
assertEquals(1, caps.size());
Capability cap = caps.iterator().next();
assertEquals("osgi.wiring.package", cap.getNamespace());