### Question:
VersioningUtils { public static final List<String> getVersions(String untaggedName, List<Application> allApplications) { List<String> allVersions = new ArrayList<String>(); Iterator<Application> it = allApplications.iterator(); while (it.hasNext()) { Application app = it.next(); if (app.getName().startsWith(untaggedName + EXPRESSION_SEPARATOR) || app.getName().equals(untaggedName)) { allVersions.add(app.getName()); } } return allVersions; }  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 testGetVersions() throws VersioningException { List<Application> listApplications = new ArrayList<Application>(); listApplications.add(new ApplicationTest(APPLICATION_NAME)); listApplications.add(new ApplicationTest(APPLICATION_NAME+ VersioningUtils.EXPRESSION_SEPARATOR+"BETA-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ VersioningUtils.EXPRESSION_SEPARATOR+"RC-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ "_RC-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ ";RC-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ ".RC-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ "-RC-1.0.0")); listApplications.add(new ApplicationTest(APPLICATION_NAME+ APPLICATION_NAME)); List<String> expResult = new ArrayList<String>(); expResult.add(APPLICATION_NAME); expResult.add(APPLICATION_NAME+ VersioningUtils.EXPRESSION_SEPARATOR+"BETA-1.0.0"); expResult.add(APPLICATION_NAME+ VersioningUtils.EXPRESSION_SEPARATOR+"RC-1.0.0"); List result = VersioningUtils.getVersions(APPLICATION_NAME, listApplications); assertEquals(expResult, result); }