ExecutionOneParamBuilderImpl extends AbstractExecutionBuilder<T> implements ExecutionOneParamBuilder<T, P0> { @Override public Execution<T> build(DependencyGraph graph) { requireNonNull(executeAction, "No execution has been specified."); final DependencyNode node0 = graph.get(param0); final Dependency dep0 = new DependencyImpl(node0, state0); return new AbstractExecution<T>( getComponent(), getState(), singleton(dep0), MissingArgumentStrategy.THROW_EXCEPTION) { @Override public boolean invoke(T component, ClassMapper classMapper) { final P0 arg0 = classMapper.apply(param0); executeAction.accept(component, arg0); return true; } }; } ExecutionOneParamBuilderImpl(
            Class<T> component, State state,
            Class<P0> param0, State state0); @Override ExecutionTwoParamBuilder<T, P0, P1> withState(
            State state1, Class<P1> param1); @Override ExecutionBuilder<T> withExecute(BiConsumer<T, P0> executeAction); @Override Execution<T> build(DependencyGraph graph);  }
@Test void build() throws InvocationTargetException, IllegalAccessException { builder.withExecute((i, s) -> {}); when(dependencyGraph.get(String.class)).thenReturn(dependencyNode); final Execution<Integer> e = builder.build(dependencyGraph); assertNotNull(e); final Execution.ClassMapper classMapper = new Execution.ClassMapper() { @Override @SuppressWarnings("unchecked") public <T> T apply(Class<T> type) { return (T) "Arne"; } }; assertTrue(e.invoke(1, classMapper)); }