test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/activiti/ActivitiHelperTest.java
test_class.identifier: ActivitiHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testGetExpressionVariableAsIntegerInvalidValue()
      {
          // Mock dependencies.
          Expression expression = mock(Expression.class);
          DelegateExecution execution = mock(DelegateExecution.class);
          when(expression.getValue(execution)).thenReturn(INVALID_VALUE);
  
          // Try to call the method under test.
          try
          {
              activitiHelper.getExpressionVariableAsInteger(expression, execution, VARIABLE_NAME, VARIABLE_REQUIRED);
              fail();
          }
          catch (IllegalArgumentException e)
          {
              assertEquals(String.format("\"%s\" must be a valid integer value.", VARIABLE_NAME), e.getMessage());
          }
      }
test_case.class_method_signature: ActivitiHelperTest.testGetExpressionVariableAsIntegerInvalidValue()
test_case.full_signature: @Test public void testGetExpressionVariableAsIntegerInvalidValue()
test_case.identifier: testGetExpressionVariableAsIntegerInvalidValue
test_case.invocations: mock mock thenReturn when getValue getExpressionVariableAsInteger fail assertEquals format getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetExpressionVariableAsIntegerInvalidValue()
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/activiti/ActivitiHelper.java
focal_class.identifier: ActivitiHelper
focal_class.class_method_signature: ActivitiHelper.getProcessIdentifyingInformation(DelegateExecution execution)
focal_class.full_signature: public String getProcessIdentifyingInformation(DelegateExecution execution)
focal_class.identifier: getProcessIdentifyingInformation
focal_class.modifiers: public
focal_class.parameters: (DelegateExecution execution)
focal_class.return: String
focal_class.signature: String getProcessIdentifyingInformation(DelegateExecution execution)
focal_class.class_method_signature: ActivitiHelper.getExpressionVariable(Expression expression, DelegateExecution execution)
focal_class.full_signature: public Object getExpressionVariable(Expression expression, DelegateExecution execution)
focal_class.identifier: getExpressionVariable
focal_class.modifiers: public
focal_class.parameters: (Expression expression, DelegateExecution execution)
focal_class.return: Object
focal_class.signature: Object getExpressionVariable(Expression expression, DelegateExecution execution)
focal_class.class_method_signature: ActivitiHelper.getExpressionVariableAsString(Expression expression, DelegateExecution execution)
focal_class.full_signature: public String getExpressionVariableAsString(Expression expression, DelegateExecution execution)
focal_class.identifier: getExpressionVariableAsString
focal_class.modifiers: public
focal_class.parameters: (Expression expression, DelegateExecution execution)
focal_class.return: String
focal_class.signature: String getExpressionVariableAsString(Expression expression, DelegateExecution execution)
focal_class.class_method_signature: ActivitiHelper.getRequiredExpressionVariableAsString(Expression expression, DelegateExecution execution, String variableName)
focal_class.full_signature: public String getRequiredExpressionVariableAsString(Expression expression, DelegateExecution execution, String variableName)
focal_class.identifier: getRequiredExpressionVariableAsString
focal_class.modifiers: public
focal_class.parameters: (Expression expression, DelegateExecution execution, String variableName)
focal_class.return: String
focal_class.signature: String getRequiredExpressionVariableAsString(Expression expression, DelegateExecution execution, String variableName)
focal_class.class_method_signature: ActivitiHelper.getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_class.full_signature: public Integer getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_class.identifier: getExpressionVariableAsInteger
focal_class.modifiers: public
focal_class.parameters: (Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_class.return: Integer
focal_class.signature: Integer getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_class.class_method_signature: ActivitiHelper.getExpressionVariableAsBoolean(Expression expression, DelegateExecution execution, String variableName, boolean isRequired,
          Boolean defaultValue)
focal_class.full_signature: public Boolean getExpressionVariableAsBoolean(Expression expression, DelegateExecution execution, String variableName, boolean isRequired,
          Boolean defaultValue)
focal_class.identifier: getExpressionVariableAsBoolean
focal_class.modifiers: public
focal_class.parameters: (Expression expression, DelegateExecution execution, String variableName, boolean isRequired,
          Boolean defaultValue)
focal_class.return: Boolean
focal_class.signature: Boolean getExpressionVariableAsBoolean(Expression expression, DelegateExecution execution, String variableName, boolean isRequired,
          Boolean defaultValue)
focal_class.class_method_signature: ActivitiHelper.constructBpmnModelFromXmlAndValidate(String xmlString)
focal_class.full_signature: public BpmnModel constructBpmnModelFromXmlAndValidate(String xmlString)
focal_class.identifier: constructBpmnModelFromXmlAndValidate
focal_class.modifiers: public
focal_class.parameters: (String xmlString)
focal_class.return: BpmnModel
focal_class.signature: BpmnModel constructBpmnModelFromXmlAndValidate(String xmlString)
focal_method.body: public Integer getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
          throws IllegalArgumentException
      {
          Integer variableInteger = null;
  
          String variableString = getExpressionVariableAsString(expression, execution);
  
          if (isRequired && StringUtils.isBlank(variableString))
          {
              throw new IllegalArgumentException("\"" + variableName + "\" must be specified.");
          }
          if (isRequired || StringUtils.isNotBlank(variableString))
          {
              try
              {
                  variableInteger = Integer.parseInt(getExpressionVariableAsString(expression, execution));
              }
              catch (Exception ex)
              {
                  throw new IllegalArgumentException("\"" + variableName + "\" must be a valid integer value.", ex);
              }
          }
          return variableInteger;
      }
focal_method.class_method_signature: ActivitiHelper.getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_method.full_signature: public Integer getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_method.identifier: getExpressionVariableAsInteger
focal_method.invocations: getExpressionVariableAsString isBlank isNotBlank parseInt getExpressionVariableAsString
focal_method.modifiers: public
focal_method.parameters: (Expression expression, DelegateExecution execution, String variableName, boolean isRequired)
focal_method.return: Integer
focal_method.signature: Integer getExpressionVariableAsInteger(Expression expression, DelegateExecution execution, String variableName, boolean isRequired)