ZenodoHelper { protected static String createAliasUsingDoi(String doi) { String doiReformattedAlias = doi.replaceAll("/", "-"); AliasableResourceInterface.checkAliasFormat(Collections.singleton(doiReformattedAlias), false); return doiReformattedAlias; } private  ZenodoHelper(); static ZenodoDoiResult registerZenodoDOI(ApiClient zenodoClient, Workflow workflow,
            WorkflowVersion workflowVersion, String workflowUrl, String dockstoreGA4GHBaseUrl,
            String dockstoreUrl, EntryVersionHelper entryVersionHelper);  }
@Test public void checkCreationFromValidDoi() { String doi = "10.5072/zenodo.372767"; ZenodoHelper.createAliasUsingDoi(doi); }
@Test public void checkAliasCreationFromDoiWithInvalidPrefix() { String doi = "drs:10.5072/zenodo.372767"; try { ZenodoHelper.createAliasUsingDoi(doi); fail("Was able to create an alias with an invalid prefix."); } catch (CustomWebApplicationException ex) { assertTrue(ex.getErrorMessage().contains("Please create aliases without these prefixes")); } }