VariableScopeElResolver extends ELResolver { protected List<VariableScopeItemELResolver> getVariableScopeItemELResolvers() { if (variableScopeItemELResolvers == null) { variableScopeItemELResolvers = Arrays.asList( new ExecutionElResolver(), new TaskElResolver(), new AuthenticatedUserELResolver(), new ProcessInitiatorELResolver(), new VariableElResolver(Context.getProcessEngineConfiguration().getObjectMapper())); } return variableScopeItemELResolvers; } VariableScopeElResolver(VariableScope variableScope); @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property); @Override void setValue(ELContext context, Object base, Object property, Object value); @Override Class<?> getCommonPropertyType(ELContext arg0, Object arg1); @Override Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext arg0, Object arg1); @Override Class<?> getType(ELContext arg0, Object arg1, Object arg2);  }
@Test public void getVariableScopeItemELResolvers_should_return_defaultItemResolvers() { ProcessEngineConfigurationImpl processEngineConfiguration = mock(ProcessEngineConfigurationImpl.class); given(processEngineConfiguration.getObjectMapper()).willReturn(new ObjectMapper()); Context.setProcessEngineConfiguration(processEngineConfiguration); doCallRealMethod().when(variableScopeElResolver).getVariableScopeItemELResolvers(); List<VariableScopeItemELResolver> variableScopeItemELResolvers = variableScopeElResolver .getVariableScopeItemELResolvers(); assertThat(variableScopeItemELResolvers) .extracting(itemResolver -> itemResolver.getClass().getName()) .containsExactly( ExecutionElResolver.class.getName(), TaskElResolver.class.getName(), AuthenticatedUserELResolver.class.getName(), ProcessInitiatorELResolver.class.getName(), VariableElResolver.class.getName() ); }