### Question:
WorkflowResource { public String getWorkflowNameFromArtifactName(String artifactName) { if (artifactName == null) { return null; } else { if (artifactName.contains(BPMN_SUFFIX)) { return artifactName.substring(0, artifactName.lastIndexOf(BPMN_SUFFIX)).split("-")[0]; } else { return artifactName.split("-")[0]; } } }  void processWorkflows(VfResourceStructure vfResourceStructure); String getWorkflowNameFromArtifactName(String artifactName); Double getWorkflowVersionFromArtifactName(String artifactName);  }### Answer:
@Test public void getWorkflowNameStandard_Test() { String workflowName = workflowResource.getWorkflowNameFromArtifactName("TestWF2-1_0.bpmn"); assertEquals("TestWF2", workflowName); }
@Test public void getWorkflowNameNoVersion_Test() { String workflowName = workflowResource.getWorkflowNameFromArtifactName("TestWF2.bpmn"); assertEquals("TestWF2", workflowName); }
@Test public void getWorkflowNameNoSuffix_Test() { String workflowName = workflowResource.getWorkflowNameFromArtifactName("TestWF2-1_0"); assertEquals("TestWF2", workflowName); }