@Test
public void convertWorks() {

  DummyTestWorkflow def = new DummyTestWorkflow();
  ListWorkflowDefinitionResponse resp = converter.convert(def);
  assertThat(resp.type, is(def.getType()));
  assertThat(resp.name, is(def.getName()));
  assertThat(resp.description, is(def.getDescription()));
  assertThat(resp.onError, is(def.getErrorState().name()));
  assertThat(resp.states, arrayContainingInAnyOrder(
      reflectEquals(getResponseState(end, Collections.<String>emptyList(), null)),
      reflectEquals(getResponseState(error, asList(end.name()), null)),
      reflectEquals(getResponseState(start, asList(end.name(), error.name()), error.name()))));
  assertThat(resp.supportedSignals, arrayContainingInAnyOrder(
      reflectEquals(getSignal(1, "one")),
      reflectEquals(getSignal(2, "two"))));
  assertThat((int)resp.settings.transitionDelaysInMilliseconds.immediate, is(def.getSettings().immediateTransitionDelay));
  assertThat((int)resp.settings.transitionDelaysInMilliseconds.waitShort, is(def.getSettings().shortTransitionDelay));
  assertThat((int)resp.settings.transitionDelaysInMilliseconds.minErrorWait, is(def.getSettings().minErrorTransitionDelay));
  assertThat((int)resp.settings.transitionDelaysInMilliseconds.maxErrorWait, is(def.getSettings().maxErrorTransitionDelay));
  assertThat(resp.settings.maxRetries, is(def.getSettings().maxRetries));
  assertThat(resp.settings.historyDeletableAfter, is(def.getSettings().historyDeletableAfter));
}