JsonConverter extends AbstractConfigurationConverter { JsonArray readJsonArrayFromConfig(final @NotNull PlexusConfiguration config, final ExpressionEvaluator evaluator) throws ComponentConfigurationException { final JsonArrayBuilder retValue = Json.createArrayBuilder(); for (PlexusConfiguration child : config.getChildren()) { retValue.add(convertChild(child, evaluator)); } return retValue.build(); }  static String plexusPluralStem(final String key); @Override boolean canConvert(final Class<?> type); @Override Object fromConfiguration(final ConverterLookup lookup,
                                    final PlexusConfiguration configuration,
                                    final Class<?> type,
                                    final Class<?> enclosingType,
                                    final ClassLoader loader,
                                    final ExpressionEvaluator evaluator,
                                    final ConfigurationListener listener); JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator); static Object stringToValue(String string);  }
@Test public void testReadJsonArrayFromConfig() throws Exception { ExpressionEvaluator eval = mock(ExpressionEvaluator.class); when(eval.evaluate(anyString())).thenAnswer(call -> call.getArgument(0, String.class)); assertEquals("expect empty json array for empty value", JsonValue.EMPTY_JSON_ARRAY, converter().readJsonArrayFromConfig(xml("emptyFoo.xml"), eval)); assertEquals("expect json array for value", arr("one").get(), converter().readJsonArrayFromConfig(xml("foosFoo.xml"), eval)); assertEquals("expect json array for value", arr("one").get(), converter().readJsonArrayFromConfig(xml("foosBar.xml"), eval)); }