Source:
<code>private void verifyMessageSplitCorrectlyForDataCoding(String payload, DataCoding dataCoding, Integer maxMessageSize) throws UnsupportedEncodingException { SmesMessageSpecification smesMessageSpecification = getSmesMessageSpecification(payload, dataCoding, maxMessageSize); if (dataCoding == null) { dataCoding = (DataCoding) ReflectionTestUtils.getField(smesMessageSpecification, "dataCoding"); } int maxCharacters; if (maxMessageSize == null) { maxCharacters = DataCodingSpecification.getMaxCharacters(dataCoding.toByte()); <START> } else { <END> maxCharacters = maxMessageSize; } int maxCharactersWithRoomForPrefix = maxCharacters - MULTISEGMENT_PREFIX_BYTES; String charsetName = DataCodingSpecification.getCharsetName(dataCoding.toByte()); List<byte[]> messageParts = (List<byte[]>) ReflectionTestUtils.getField(smesMessageSpecification, "shortMessageParts"); int expectedPartsCountAfterSplit = (payload.length() + maxCharactersWithRoomForPrefix - 1) / maxCharactersWithRoomForPrefix; if (Boolean.getBoolean("show_test_output")) { System.out.println("Datacoding[" + dataCoding.getClass().getSimpleName() + " " + dataCoding.toByte() + "] maxCharacters: " + maxCharacters + ", maxCharactersWithRoomForPrefix: " + maxCharactersWithRoomForPrefix + ", payload length: " + payload.length() + ", expectedPartsCountForDataCoding: " + expectedPartsCountAfterSplit); } assertEquals("Message parts count after split does not match expected size", expectedPartsCountAfterSplit, messageParts.size()); for (byte[] messagePart : messageParts) { String string = new String(messagePart, charsetName); assertTrue("MessagePart is longer than allowed max message size for data coding - Actual part length: " + string.length() + " vs. max size: " + maxCharacters, string.length() <= maxCharacters); } }</code><technical_language>else, catch, finally etc. new line</technical_language>

Target:
private void verifyMessageSplitCorrectlyForDataCoding(String payload, DataCoding dataCoding, Integer maxMessageSize) throws UnsupportedEncodingException { SmesMessageSpecification smesMessageSpecification = getSmesMessageSpecification(payload, dataCoding, maxMessageSize); if (dataCoding == null) { dataCoding = (DataCoding) ReflectionTestUtils.getField(smesMessageSpecification, "dataCoding"); } int maxCharacters; if (maxMessageSize == null) { maxCharacters = DataCodingSpecification.getMaxCharacters(dataCoding.toByte()); } else { maxCharacters = maxMessageSize; } int maxCharactersWithRoomForPrefix = maxCharacters - PREFIX_BYTES; String charsetName = DataCodingSpecification.getCharsetName(dataCoding.toByte()); List<byte[]> messageParts = (List<byte[]>) ReflectionTestUtils.getField(smesMessageSpecification, "shortMessageParts"); int expectedPartsCountAfterSplit = (payload.length() + maxCharactersWithRoomForPrefix - 1) / maxCharactersWithRoomForPrefix; assertEquals("Message parts count after split does not match expected size", expectedPartsCountAfterSplit, messageParts.size()); for (byte[] messagePart : messageParts) { String string = new String(messagePart, charsetName); assertTrue("MessagePart is longer than allowed max message size for data coding - Actual part length: " + string.length() + " vs. max size: " + maxCharacters , string.length() <= maxCharacters); } }