aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-cpd-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sonar-cpd-plugin')
-rw-r--r--plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
index 2b6c2b39a4e..434049fdbd6 100644
--- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
+++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
@@ -19,16 +19,6 @@
*/
package org.sonar.plugins.cpd;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.batch.SensorContext;
@@ -39,6 +29,14 @@ import org.sonar.api.test.IsMeasure;
import org.sonar.duplications.index.CloneGroup;
import org.sonar.duplications.index.ClonePart;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import static org.mockito.Matchers.argThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.*;
+
public class SonarEngineTest {
private SensorContext context;
@@ -132,7 +130,7 @@ public class SonarEngineTest {
}
private CloneGroup newCloneGroup(ClonePart... parts) {
- return new CloneGroup(0, parts[0], Arrays.asList(parts));
+ return CloneGroup.builder().setLength(0).setOrigin(parts[0]).setParts(Arrays.asList(parts)).build();
}
}