@Test
public void updateWorkflowInstanceThrowsExceptionWhenActionIsNull() {

  WorkflowInstance i = constructWorkflowInstanceBuilder().setId(42).build();
  WorkflowInstanceAction a = null;
  IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, () -> service.updateWorkflowInstance(i, a));
  assertThat(thrown.getMessage(), is("Workflow instance action can not be null"));
}