### Question:
AbstractWidgetConverter implements PropertyConverter { protected UiSchema.Trigger toTrigger(final Collection<SimplePropertyDefinition> properties, final SimplePropertyDefinition prop, final ActionReference ref) { final UiSchema.Trigger trigger = new UiSchema.Trigger(); trigger .setAction(prop .getMetadata() .entrySet() .stream() .filter(it -> matchAction(it, ref)) .findFirst() .map(Map.Entry::getValue) .orElseGet(ref::getName)); trigger.setFamily(ref.getFamily()); trigger.setType(ref.getType()); trigger .setParameters(toParams(properties, prop, ref, prop.getMetadata().get("action::" + ref.getType() + "::parameters"))); return trigger; }    }### Answer:
@Test void triggerArrayParameters() throws Exception { try (final Jsonb jsonb = JsonbBuilder.create(); final InputStream stream = Thread .currentThread() .getContextClassLoader() .getResourceAsStream("object-array-in-parameter.json")) { final ComponentDetail details = jsonb.fromJson(stream, ComponentDetail.class); final AtomicReference<UiSchema.Trigger> trigger = new AtomicReference<>(); new AbstractWidgetConverter(new ArrayList<>(), details.getProperties(), emptyList(), new JsonSchema(), "en") { @Override public CompletionStage<PropertyContext<?>> convert(final CompletionStage<PropertyContext<?>> context) { throw new UnsupportedOperationException(); } { trigger .set(toTrigger(details.getProperties(), details .getProperties() .stream() .filter(it -> it.getName().equals("filterAdvancedValueWrapper")) .findFirst() .orElseThrow(IllegalArgumentException::new), details .getActions() .stream() .filter(it -> it.getName().equals("updatableFilterAdvanced")) .findFirst() .orElseThrow(IllegalArgumentException::new))); } }; final UiSchema.Parameter parameter = trigger .get() .getParameters() .stream() .filter(it -> it.getPath().equals("configuration.selectionFilter.filterLines")) .findFirst() .orElseThrow(IllegalStateException::new); assertEquals("filterLines", parameter.getKey()); } }
@Test void triggerWithParameters() { final AtomicReference<UiSchema.Trigger> trigger = new AtomicReference<>(); final Set<SimplePropertyDefinition> singleton = singleton(new SimplePropertyDefinition("foo", "foo", null, "enum", null, new PropertyValidation(), new HashMap<String, String>() { { put("action::ty", "other::foo(bar=dummy)"); } }, null, new LinkedHashMap<>())); new AbstractWidgetConverter(new ArrayList<>(), singleton, emptyList(), new JsonSchema(), "en") { @Override public CompletionStage<PropertyContext<?>> convert(final CompletionStage<PropertyContext<?>> context) { throw new UnsupportedOperationException(); } { trigger .set(toTrigger(singleton, singleton.iterator().next(), new ActionReference("fam", "other::foo", "ty", null, emptyList()))); } }; final UiSchema.Trigger output = trigger.get(); assertEquals("fam", output.getFamily()); assertEquals("ty", output.getType()); assertEquals("other::foo(bar=dummy)", output.getAction()); }