/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.job.internal;

import org.junit.jupiter.api.Test;
import org.xwiki.job.DefaultRequest;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class DefaultRequestTest
{
    @Test
    public void createDefaultRequestWithPassedRequest()
    {
        DefaultRequest request = new DefaultRequest();

        request.setInteractive(true);
        request.setProperty("property", "value");
        request.setRemote(true);
        request.setId("id");

        DefaultRequest request2 = new DefaultRequest(request);

        assertEquals(request.getId(), request2.getId());
        assertEquals(request.<String>getProperty("property"), request2.<String>getProperty("property"));
        assertEquals(request.isRemote(), request2.isRemote());
        assertEquals(request.isInteractive(), request2.isInteractive());
    }
}

@@ -1053,16 +1053,75 @@
 tEquals;
+%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;
 %0A%0Apublic
@@ -1516,23 +1516,27 @@
 als(
+1, 
 request
+2
 .getId()
 , re
@@ -1531,32 +1531,21 @@
 .getId()
-, request2.getId
+.size
 ());%0A   
@@ -1566,47 +1566,68 @@
 als(
+%22id%22, 
 request
-.%3CString%3EgetProperty(%22property%22)
+2.getId().get(0));%0A        assertEquals(%22value%22
 , re
@@ -1685,35 +1685,13 @@
 sert
-Equals(request.isRemote(), 
+True(
 requ
@@ -1726,40 +1726,13 @@
 sert
-Equals(request.isInteractive(), 
+True(
 requ

Improve mutation score (descartes). Was missing testing that getProperty returns the right value (if setProperty is replaced by an empty code the test was still passing).