aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java b/container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java
index 5fbe8858186..46859ab1cbe 100644
--- a/container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/query/properties/test/PropertyMapTestCase.java
@@ -2,13 +2,12 @@
package com.yahoo.search.query.properties.test;
import com.yahoo.processing.request.properties.PropertyMap;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.util.Collections;
import java.util.List;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.*;
/**
* @author bratseth
@@ -16,24 +15,24 @@ import static org.junit.Assert.assertTrue;
public class PropertyMapTestCase {
@Test
- public void testCloning() {
+ void testCloning() {
PropertyMap map = new PropertyMap();
map.set("clonable", new ClonableObject());
map.set("nonclonable", new NonClonableObject());
- map.set("clonableArray", new ClonableObject[] {new ClonableObject()});
- map.set("nonclonableArray", new NonClonableObject[] {new NonClonableObject()});
+ map.set("clonableArray", new ClonableObject[]{new ClonableObject()});
+ map.set("nonclonableArray", new NonClonableObject[]{new NonClonableObject()});
map.set("clonableList", Collections.singletonList(new ClonableObject()));
map.set("nonclonableList", Collections.singletonList(new NonClonableObject()));
assertNotNull(map.get("clonable"));
assertNotNull(map.get("nonclonable"));
- PropertyMap mapClone=map.clone();
+ PropertyMap mapClone = map.clone();
assertTrue(map.get("clonable") != mapClone.get("clonable"));
- assertTrue(map.get("nonclonable") == mapClone.get("nonclonable"));
+ assertEquals(map.get("nonclonable"), mapClone.get("nonclonable"));
assertTrue(map.get("clonableArray") != mapClone.get("clonableArray"));
assertTrue(first(map.get("clonableArray")) != first(mapClone.get("clonableArray")));
- assertTrue(first(map.get("nonclonableArray")) == first(mapClone.get("nonclonableArray")));
+ assertEquals(first(map.get("nonclonableArray")), first(mapClone.get("nonclonableArray")));
}
private Object first(Object object) {