@Override
  public void createWorkflowDef(WorkflowDef def) {
    LOG.info("Creating a workflow definition: {}", def);
    createOrUpdateWorkflowDefinition(
        CREATE_WORKFLOW_DEFINITION_STATEMENT, def, "createWorkflowDef");
  }
@Test(expected = ApplicationException.class)
  public void testDuplicate() {
    WorkflowDef wfd = new WorkflowDef();
    wfd.setName("foo");
    wfd.setVersion(1);

    dao.createWorkflowDef(wfd);
    dao.createWorkflowDef(wfd);
  }