source: class ListWorkflowInstanceConverterTest {
  
    @Mock
    private ObjectMapper nflowObjectMapper;
    @InjectMocks
    private final ListWorkflowInstanceConverter converter;
  
    @Test
    public void convertWithoutStateVariablesWorks() {
  
target:     WorkflowInstanceAction a = new WorkflowInstanceAction.Builder().setId(929).setType(stateExecution).setState("oState")
          .setStateText("oState desc").setRetryNo(1).setExecutionStart(now().minusDays(1)).setExecutionEnd(now().plusDays(1))
          .build();
      WorkflowInstance i = new WorkflowInstance.Builder().setId(1).setStatus(inProgress).setType("dummy")
          .setBusinessKey("businessKey").setExternalId("externalId").setState("cState").setStateText("cState desc")
          .setNextActivation(now()).setActions(Arrays.asList(a)).build();
  
      ListWorkflowInstanceResponse resp = converter.convert(i, emptySet());
  
      assertThat(resp.id, is(i.id));
      assertThat(resp.stateVariables, is((Map<String, Object>) null));
      assertThat(resp.type, is(i.type));
      assertThat(resp.businessKey, is(i.businessKey));
      assertThat(resp.externalId, is(i.externalId));
      assertThat(resp.state, is(i.state));
      assertThat(resp.stateText, is(i.stateText));
      assertThat(resp.nextActivation, is(i.nextActivation));
      assertThat(resp.actions, nullValue());
    }
  
  }