### Question:
VersioningUtils { public static final String getUntaggedName(String appName) throws VersioningSyntaxException { if(appName != null && !appName.isEmpty()){ int colonIndex = appName.indexOf(EXPRESSION_SEPARATOR); if (colonIndex >= 0){ if (colonIndex == 0) { throw new VersioningSyntaxException( LOCALSTRINGS.getLocalString("versioning.deployment.invalid.appname1", "excepted application name before colon: {0}", appName)); } else if (colonIndex == (appName.length() - 1)) { throw new VersioningSyntaxException( LOCALSTRINGS.getLocalString("versioning.deployment.invalid.appname2", "excepted version identifier after colon: {0}", appName)); } return appName.substring(0, colonIndex); } } return appName; }  static final String getUntaggedName(String appName); static final String getExpression(String appName); static final void checkIdentifier(String appName); static final List<String> getVersions(String untaggedName,
            List<Application> allApplications); static final List<String> matchExpression(List<String> listVersion, String appName); static final String getRepositoryName(String appName); static final Boolean isUntagged(String appName); static final Boolean isVersionExpression(String appName); static final Boolean isVersionExpressionWithWildCard(String appName); static final Boolean isVersionIdentifier(String appName); static final LocalStringManagerImpl LOCALSTRINGS; static final String EXPRESSION_SEPARATOR; static final String EXPRESSION_WILDCARD; static final String REPOSITORY_DASH; }### Answer:
@Test public void testGetUntaggedName() throws VersioningSyntaxException { String expression = APPLICATION_NAME + VersioningUtils.EXPRESSION_SEPARATOR + "RC-" + VersioningUtils.EXPRESSION_WILDCARD; String result = VersioningUtils.getUntaggedName(expression); assertEquals(APPLICATION_NAME, result); expression = APPLICATION_NAME + VersioningUtils.EXPRESSION_SEPARATOR + "RC-1.0.0"; result = VersioningUtils.getUntaggedName(expression); assertEquals(APPLICATION_NAME, result); expression = APPLICATION_NAME; result = VersioningUtils.getUntaggedName(expression); assertEquals(APPLICATION_NAME, result); expression = APPLICATION_NAME + VersioningUtils.EXPRESSION_SEPARATOR; try { result = VersioningUtils.getUntaggedName(expression); fail("the getUntagged method did not throw a VersioningDeploymentSyntaxException"); } catch(VersioningSyntaxException e){} }