class DependencyNodeImpl implements DependencyNode {

    private final Class<?> representedType;
    private final Set<Dependency> dependencies;
    private final List<Execution<?>> executions;
    private State currentState;

    public DependencyNodeImpl(Class<?> representedType) {
        this.representedType = requireNonNull(representedType);
        this.dependencies    = newSetFromMap(new ConcurrentHashMap<>());
        this.executions      = new CopyOnWriteArrayList<>();
        this.currentState    = State.CREATED;
    }
    
    @Override
    public Class<?> getRepresentedType() {
        return representedType;
    }

    @Override
    public Set<Dependency> getDependencies() {
        return dependencies;
    }
    
    @Override
    public List<Execution<?>> getExecutions() {
        return executions;
    }

    @Override
    public State getCurrentState() {
        return currentState;
    }

    @Override
    public void setState(State newState) {
        currentState = requireNonNull(newState);
    }

    @Override
    public boolean canBe(State state) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean is(State state) {
        return currentState.ordinal() >= state.ordinal();
    }

    
}

        // Make sure all dependencies of the executions have been satisfied.
        return executions.stream()
            .filter(e -> e.getState().ordinal() <= state.ordinal())
            .flatMap(e -> e.getDependencies().stream())
            .map(Dependency::getNode)
            .allMatch(node -> node.is(state));
    
<no_super_class>