ProcessInitiatorELResolver implements VariableScopeItemELResolver { @Override public boolean canResolve(String property, VariableScope variableScope) { return INITIATOR_KEY.equals(property) && variableScope instanceof ExecutionEntity; }  @Override boolean canResolve(String property, VariableScope variableScope); @Override Object resolve(String property, VariableScope variableScope);  }
@Test public void canResolve_should_returnTrueWhenItsExecutionEntityAndPropertyIsInitiator() { boolean canResolve = resolver.canResolve(INITIATOR, new ExecutionEntityImpl()); assertThat(canResolve).isTrue(); }
@Test public void canResolve_should_returnFalseWhenItsExecutionEntityAndPropertyIsNotInitiator() { boolean canResolve = resolver.canResolve("anyOtherProperty", new ExecutionEntityImpl()); assertThat(canResolve).isFalse(); }
@Test public void canResolve_should_returnFalseWhenItsNotExecutionEntityAndPropertyIsInitiator() { boolean canResolve = resolver.canResolve(INITIATOR, mock(VariableScope.class)); assertThat(canResolve).isFalse(); }