### Question:
WorkflowAction { public void handleRuntimeException(DelegateExecution execution) { StringBuilder wfeExpMsg = new StringBuilder("Runtime error "); String runtimeErrorMessage; try { String javaExpMsg = (String) execution.getVariable("BPMN_javaExpMsg"); if (javaExpMsg != null && !javaExpMsg.isEmpty()) { wfeExpMsg.append(": ").append(javaExpMsg); } runtimeErrorMessage = wfeExpMsg.toString(); logger.error(runtimeErrorMessage); execution.setVariable(WORKFLOW_ACTION_ERROR_MESSAGE, runtimeErrorMessage); } catch (Exception e) { logger.error("Runtime error", e); runtimeErrorMessage = "Runtime error"; } exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, runtimeErrorMessage); }  void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils); void setBbInputSetup(BBInputSetup bbInputSetup); void selectExecutionList(DelegateExecution execution); void handleRuntimeException(DelegateExecution execution);  }### Answer:
@Test public void handleRuntimeExceptionTest() { execution.setVariable("BPMN_javaExpMsg", "test runtime error message"); execution.setVariable("testProcessKey", "testProcessKeyValue"); try { workflowAction.handleRuntimeException(execution); } catch (BpmnError wfe) { assertEquals("MSOWorkflowException", wfe.getErrorCode()); } }