@Test
public void testFromConfiguration() throws Exception {

    final ConverterLookup lookup = mock(ConverterLookup.class);
    final PlexusConfiguration config = xml("foosBar.xml");
    final Class<?> type = JsonObject.class;
    final Class<?> enclosingType = Object.class;
    final ClassLoader loader = getClass().getClassLoader();
    final ExpressionEvaluator eval = mock(ExpressionEvaluator.class);
    when(eval.evaluate(anyString())).thenAnswer(call -> call.getArgument(0, String.class));
    final ConfigurationListener listener = mock(ConfigurationListener.class);
    assertEquals("should convert config", key("bar", "one").get(),
            converter().fromConfiguration(lookup, config, type, enclosingType, loader, eval, listener));
}