Modification modificationFromDescription(String output, ConsoleResult result) throws P4OutputParseException {
        String[] parts = StringUtils.splitByWholeSeparator(output, SEPARATOR);
        Pattern pattern = Pattern.compile(DESCRIBE_OUTPUT_PATTERN, Pattern.MULTILINE);
        Matcher matcher = pattern.matcher(parts[0]);
        if (matcher.find()) {
            Modification modification = new Modification();
            parseFistline(modification, matcher.group(1), result);
            parseComment(matcher, modification);
            parseAffectedFiles(parts, modification);
            return modification;
        }
        throw new P4OutputParseException("Could not parse P4 description: " + output);
    }
@Test
    void shouldParseDescriptionProperly_Bug2456() throws P4OutputParseException {
        String description =
                """
                        Change 570548 by michael@michael_AB2-ENV-WXP-000_ABcore on 2009/01/12 14:47:04

                        \tAdd a WCF CrossDomainPolicyService and CrossDomain.xml.
                        \tUpdate service reference.
                        \tUpdate app.config and template config files.

                        Affected files ...

                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.Security.ServiceContracts/ICrossDomainPolicyService.cs#1 add
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.Security.ServiceContracts/Somemv.Core.Security.ServiceContracts.csproj#3 edit
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.Security.Services/CrossDomainPolicyService.cs#1 add
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.Security.Services/Somemv.Core.Security.Services.csproj#4 edit
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.ServiceReferences/Somemv.Core.ServiceReferences.csproj#44 edit
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.ServiceReferences/Service References/SecurityService/SecurityService33.xsd#2 edit
                        ... //APP/AB/Core/Somemv.Core/Somemv.Core.ServiceReferences/app.config#30 edit
                        ... //APP/AB/Core/Somemv.Simulation/Somemv.Simulation.Coordinator.Services/Analysis/AnalysisServiceAdapter.cs#30 edit
                        ... //APP/AB/Core/Somemv.Simulation/Somemv.Simulation.Services/ManageableService.cs#4 edit
                        ... //APP/AB/Core/Products/Somemv.RemotingService/App.config#102 edit
                        ... //APP/AB/Core/Products/Somemv.RemotingService/CrossDomain.xml#1 add
                        ... //APP/AB/Core/Products/Somemv.RemotingService/Somemv.RemotingService.csproj#53 edit
                        ... //APP/AB/Core/Templates/Somemv.RemotingService/app_template.config#69 edit
                        ... //APP/AB/Core/Templates/Somemv.RemotingService/coordinator_template.config#69 edit
                        """;

        Modification modification = parser.modificationFromDescription(description, new ConsoleResult(0, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>()));
        assertThat(modification.getComment()).isEqualTo("""
                Add a WCF CrossDomainPolicyService and CrossDomain.xml.
                Update service reference.
                Update app.config and template config files.""");

    }

    @Test
    void shouldParseCommentWithAffectedFilesCorrectly() throws P4OutputParseException {
        String description =
                """
                        Change 5 by cceuser@CceDev01 on 2009/08/06 14:21:30

                        \tAffected files ...
                        \t
                        \t... //DEPOT/FILE#943 edit

                        Affected files ...

                        ... //depot/file#5 edit""";

        Modification modification = parser.modificationFromDescription(description, new ConsoleResult(0, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>()));
        assertThat(modification.getComment()).isEqualTo("""
                Affected files ...

                ... //DEPOT/FILE#943 edit""");

    }

    @Test
    void shouldParseCorrectlyWhenCommentIsEmpty() throws P4OutputParseException {
        String description =
                """
                        Change 102 by godev@blrstdcrspair03 on 2013/06/04 12:00:35


                        Affected files ...

                        ... //another_depot/1.txt#6 edit""";

        Modification modification = parser.modificationFromDescription(description, new ConsoleResult(0, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>()));
        assertThat(modification.getComment()).isEqualTo("");
    }