@Test
public void createWorkflowShouldFailWithForbiddenIfNotAuthorized() throws Exception {

  sinceVersion(Api.Version.V3);
  doThrow(new ResponseException(Response.forStatus(FORBIDDEN)))
      .when(workflowActionAuthorizer).authorizeWorkflowAction(any(), any(Workflow.class));
  final Response<ByteString> response = awaitResponse(
      serviceHelper.request("POST", path("/foo"), serialize(WORKFLOW_CONFIGURATION)));
  assertThat(response, hasStatus(withCode(FORBIDDEN)));
  verify(storage, never()).patchState(any(), any());
  verifyNoInteractions(workflowValidator);
  verifyNoInteractions(workflowInitializer);
  verifyNoInteractions(workflowConsumer);
}