@Test
public void shouldReturnCurrentWorkflowState() throws Exception {

  sinceVersion(Api.Version.V3);
  Response<ByteString> response =
      awaitResponse(serviceHelper.request("GET", path("/foo/bar/state")));
  assertThat(response, hasStatus(withCode(Status.OK)));
  assertJson(response, "enabled", equalTo(false));
  storage.patchState(WORKFLOW.id(),
                     WorkflowState.patchEnabled(true));
  response =
      awaitResponse(serviceHelper.request("GET", path("/foo/bar/state")));
  assertThat(response, hasStatus(withCode(Status.OK)));
  assertJson(response, "enabled", equalTo(true));
}