InjectorDependencyNode implements DependencyNode { @Override public boolean is(State state) { if (state == State.STOPPED) { return !running; } else return true; }  @Override Class<?> getRepresentedType(); @Override Set<Dependency> getDependencies(); @Override List<Execution<?>> getExecutions(); @Override State getCurrentState(); @Override void setState(State newState); @Override boolean canBe(State state); @Override boolean is(State state);  }
@Test void is() { assertTrue(instance.is(State.CREATED)); assertTrue(instance.is(State.INITIALIZED)); assertTrue(instance.is(State.RESOLVED)); assertTrue(instance.is(State.STARTED)); assertFalse(instance.is(State.STOPPED)); instance.setState(State.STOPPED); assertTrue(instance.is(State.STARTED)); assertTrue(instance.is(State.STOPPED)); }