@Test public void BGC_transfer() throws Exception { fakeSparService.add(OTHER_PERSONAL_IDENTIFIER, ADDRESS); Map<String, Object> properties = new HashMap<>(); properties.put("personalIdentifier", OTHER_PERSONAL_IDENTIFIER); String ocr = "5450897"; properties.put("ocr", ocr); runtimeService.startProcessInstanceByMessage("create-insurance", ocr, properties); when_all_jobs_within_X_days_are_executed(10); Execution execution = runtimeService .createExecutionQuery() .messageEventSubscriptionName("bgc") .processVariableValueEquals("ocr", ocr) .singleResult(); assertThat(execution, notNullValue()); Map<String, Object> eventProperties = new HashMap<String, Object>(); properties.put("amount", 56000); runtimeService.messageEventReceived("bgc", execution.getId(), eventProperties); }