}
@Test
public void importAndOverride() {
service = (URIBrokerServiceImpl) factory.getBean("import");
URIBrokerServiceImpl imported = (URIBrokerServiceImpl) factory.getBean("uris");
// check exposed names
List<String> importedNames = createArrayList(imported.getExposedNames());
List<String> names = createArrayList(service.getExposedNames());
names.add("link2");
sort(importedNames);
sort(names);
assertEquals(importedNames, names);
// check all names
importedNames = createArrayList(imported.getNames());
names = createArrayList(service.getNames());
importedNames.add("newlink");
sort(importedNames);
sort(names);
assertEquals(importedNames, names);
// check uris
for (String name : names) {
URIBroker uri = service.getURIBroker(name);
URIBroker importedUri = imported.getURIBroker(name);
if (uri != null) {
uri = uri.getParent();
assertFalse(uri.isAutoReset());
}