when(ref2.context().type()).thenReturn(capabilityType);
when(ref3.context()).thenReturn(mock(CapabilityContext.class));
when(ref3.context().type()).thenReturn(capabilityType(Capability.class.getName()));
final CapabilityDescriptorRegistry descriptorRegistry = mock(CapabilityDescriptorRegistry.class);
final CapabilityDescriptor descriptor = mock(CapabilityDescriptor.class);
when(descriptor.name()).thenReturn(this.getClass().getSimpleName());
when(descriptorRegistry.get(capabilityType)).thenReturn(descriptor);
underTest = new CapabilityOfTypeActiveCondition(
eventBus, descriptorRegistry, capabilityRegistry, capabilityType
);
underTest.bind();