throws Exception
{
final CapabilityDescriptor descriptor = mock(CapabilityDescriptor.class);
when(capabilityDescriptorRegistry.get(CAPABILITY_TYPE)).thenReturn(descriptor);
when(descriptor.formFields()).thenReturn(Arrays.<FormField>asList(
new PasswordFormField("foo", "foo", "?", FormField.OPTIONAL)
));
Map<String, String> properties = Maps.newHashMap();
properties.put("foo", "bar");
underTest.add(CAPABILITY_TYPE, true, null, properties);