/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License;
 * you may not use this file except in compliance with the Elastic License.
 */

package org.elasticsearch.xpack.logstash.action;

import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class GetPipelineRequestTests extends AbstractWireSerializingTestCase<GetPipelineRequest> {

    @Override
    protected Writeable.Reader<GetPipelineRequest> instanceReader() {
        return GetPipelineRequest::new;
    }

    @Override
    protected GetPipelineRequest createTestInstance() {
        return new GetPipelineRequest(randomList(0, 50, () -> randomAlphaOfLengthBetween(2, 10)));
    }

    @Override
    protected GetPipelineRequest mutateInstance(GetPipelineRequest instance) {
        List<String> ids = new ArrayList<>(instance.ids());
        if (randomBoolean()) {
            // append another ID
            ids.add(randomAlphaOfLengthBetween(2, 10));
        } else {
            ids = ids.stream().map(id -> id + randomAlphaOfLength(1)).collect(Collectors.toList());
        }
        return new GetPipelineRequest(ids);
    }
}

@@ -1078,16 +1078,35 @@
 oolean()
+ %7C%7C ids.size() == 0
 ) %7B%0A    
@@ -1207,16 +1207,65 @@
  else %7B%0A
+            // change the strings in the request%0A
         

Fix logstash plugin unit test error (#62348)