public void testUpdateAttributes_shouldChangeInstance() throws Exception {
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("answer", "42");
Map<String, Object> properties = new Hashtable<String, Object>();
properties.put("foo", "bar");
ConnectorDescription connectorDescription = new ConnectorDescription("test", "testc", attributes, properties);
String connectorId = UUID.randomUUID().toString();
registrationManager.updateRegistration(connectorId, connectorDescription);
ConnectorDescription updated = new ConnectorDescription("test", "testc");
Map<String, String> newAttrs = new HashMap<String, String>();
newAttrs.put("answer", "43");
updated.setAttributes(newAttrs);
updated.setProperties(properties);
registrationManager.updateRegistration(connectorId, updated);
serviceUtils.getService("(foo=bar)", 100L);
Filter filter = FilterUtils.makeFilter(ConnectorInstanceFactory.class, "(connector=testc)");
ConnectorInstanceFactory factory = (ConnectorInstanceFactory) serviceUtils.getService(filter);