source.set("source.id", null);
assertTrue(instance.getState() == ComponentInstance.INVALID);
DependencyHandlerDescription desc = (DependencyHandlerDescription) instance.getInstanceDescription()
.getHandlerDescription("org.apache.felix.ipojo:requires");
DependencyDescription dependency = desc.getDependencies()[0];
assertEquals("(id=${source.id})", dependency.getFilter());
// Register a new source.
MyContextSource source2 = new MyContextSource();
source2.set("source.id", 2);
registration2 = context.registerService(ContextSource.class.getName(),