### Question:
StringMerger { static String mergeStrings(String part1, String part2) { int sizeDiff = part1.length() - part2.length(); if (sizeDiff < 0 || sizeDiff > 1) { throw new IllegalArgumentException("Invalid input received"); } StringBuilder url = new StringBuilder(part1.length() + part2.length()); for (int i = 0; i < part1.length(); i++) { url.append(part1.charAt(i)); if (part2.length() > i) { url.append(part2.charAt(i)); } } return url.toString(); }    }### Answer:
@Test public void mergeStrings_whenPartsAreUnequalLength() { String part1 = "hts/eapecm"; String part2 = "tp:/xml.o"; assertThat(mergeStrings(part1, part2)).isEqualTo("https: }
@Test public void mergeStrings_whenPartsAreEqualLength() { String part1 = "hts/eape.o"; String part2 = "tp:/xmlscm"; assertThat(mergeStrings(part1, part2)).isEqualTo("https: }
@Test public void mergeStrings_whenPart2IsLongerThanPart1() { String part1 = "135"; String part2 = "2467"; assertThrows(IllegalArgumentException.class, () -> mergeStrings(part1, part2)); }