### Question:
AllocationIdUtil { public static String getNextVersionOfAllocationId(final String allocId) { final Matcher matcher = ALLOCATION_ID_PATTERN.matcher(allocId); if (matcher.matches()) { final String formerPart = matcher.group(1); final int version = Integer.parseInt(matcher.group(2)); final int newVersion = version + 1; return "#" + formerPart + newVersion; } else { throw new IllegalStateException("Could not get the next version of allocation id for " + allocId); } }  static String getAllocationName(final String allocId); static Set<Allocation> getOutdatedAllocations(final TestDefinition previous, final TestDefinition current); static String getNextVersionOfAllocationId(final String allocId); static String generateAllocationId(final int index, final int version); static int convertBase26ToDecimal(final char[] chars); static final Comparator<String> ALLOCATION_ID_COMPARATOR; }### Answer:
@Test public void testGetNextVersionOfAllocationId() { assertEquals("#A2", AllocationIdUtil.getNextVersionOfAllocationId("#A1")); }