### Question:
WorkflowResource { public Double getWorkflowVersionFromArtifactName(String artifactName) { if (artifactName == null) { return null; } else { String[] workflowNameParts = null; if (artifactName.contains(BPMN_SUFFIX)) { workflowNameParts = artifactName.substring(0, artifactName.lastIndexOf(BPMN_SUFFIX)).split("-"); } else { workflowNameParts = artifactName.split("-"); } if (workflowNameParts.length < 2) { return null; } else { return Double.valueOf(workflowNameParts[1].replaceAll("_", ".")); } } }  void processWorkflows(VfResourceStructure vfResourceStructure); String getWorkflowNameFromArtifactName(String artifactName); Double getWorkflowVersionFromArtifactName(String artifactName);  }### Answer:
@Test public void getWorkflowVersionStandard_Test() { Double workflowVersion = workflowResource.getWorkflowVersionFromArtifactName("TestWF2-1_0.bpmn"); assertTrue(workflowVersion == 1.0); }
@Test public void getWorkflowVersionNoVersion_Test() { Double workflowVersion = workflowResource.getWorkflowVersionFromArtifactName("TestWF2.bpmn"); assertNull(workflowVersion); }
@Test public void getWorkflowVersionNoSuffix_Test() { Double workflowVersion = workflowResource.getWorkflowVersionFromArtifactName("TestWF2-1_0"); assertTrue(workflowVersion == 1.0); }