jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Remove deprecation warnings in test code
Date Thu, 07 May 2020 19:21:54 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 64f92a1  Remove deprecation warnings in test code
64f92a1 is described below

commit 64f92a100eccd50cb4abebfb9a758d3f3ad3b217
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Thu May 7 21:18:31 2020 +0200

    Remove deprecation warnings in test code
    
    org.junit.Assert#assertThat has been deprecated and suggests using
    org.hamcrest.MatcherAssert#asssertThat instead. The implementation
    of Assert#assertThat uses the MatcherAssert#assertThat already.
    
    So no functional change is expected.
---
 .../org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java    |  2 +-
 .../java/org/apache/jmeter/extractor/TestRegexExtractor.java   |  2 +-
 .../jmeter/extractor/json/jmespath/TestJMESPathExtractor.java  |  2 +-
 .../test/java/org/apache/jmeter/timers/TimerServiceTest.java   | 10 +++++-----
 .../org/apache/jmeter/visualizers/TestSampleCompareTo.java     |  2 +-
 .../org/apache/jmeter/report/core/CsvSampleReaderTest.java     |  7 ++++---
 .../report/processor/graph/impl/CustomGraphConsumerTest.java   |  2 +-
 .../apache/jmeter/samplers/TestDataStrippingSampleSender.java  |  2 +-
 .../jmeter/testelement/property/AbstractPropertyTest.java      |  2 +-
 .../apache/jmeter/testelement/property/MapPropertyTest.java    |  2 +-
 .../apache/jmeter/threads/TestUnmodifiableJMeterVariables.java |  2 +-
 .../java/org/apache/jmeter/util/JSR223TestElementTest.java     |  2 +-
 .../src/test/java/org/apache/jmeter/util/XPathUtilTest.java    |  2 +-
 .../test/java/org/apache/jorphan/reflect/TestClassFinder.java  |  5 +++--
 .../apache/jmeter/functions/TestRandomFromMultipleVars.java    |  3 ++-
 .../apache/jmeter/functions/TestTimeRandomDateFunction.java    |  2 +-
 .../org/apache/jmeter/functions/TestTimeShiftFunction.java     |  2 +-
 .../java/org/apache/jorphan/gui/MinMaxLongRendererTest.java    |  4 ++--
 .../java/org/apache/jorphan/gui/ObjectTableSorterTest.java     |  2 +-
 .../test/java/org/apache/jorphan/util/TestJorphanUtils.java    |  8 ++++----
 .../apache/jmeter/protocol/http/control/TestAuthorization.java |  2 +-
 .../jmeter/protocol/http/parser/TestBug60842HtmlParser.java    |  2 +-
 .../org/apache/jmeter/protocol/http/parser/TestCssParser.java  |  2 +-
 .../protocol/http/sampler/TestSerializedHTTPSampler.java       |  2 +-
 24 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/src/components/src/test/java/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
b/src/components/src/test/java/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
index f8a6175..67035e4 100644
--- a/src/components/src/test/java/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
+++ b/src/components/src/test/java/org/apache/jmeter/extractor/TestHtmlExtractorJSoup.java
@@ -17,9 +17,9 @@
 
 package org.apache.jmeter.extractor;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.threads.JMeterContext;
diff --git a/src/components/src/test/java/org/apache/jmeter/extractor/TestRegexExtractor.java
b/src/components/src/test/java/org/apache/jmeter/extractor/TestRegexExtractor.java
index 24491eb..8e62a1d 100644
--- a/src/components/src/test/java/org/apache/jmeter/extractor/TestRegexExtractor.java
+++ b/src/components/src/test/java/org/apache/jmeter/extractor/TestRegexExtractor.java
@@ -18,11 +18,11 @@
 package org.apache.jmeter.extractor;
 
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.net.URL;
diff --git a/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
b/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
index f408421..8465fe2 100644
--- a/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
+++ b/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.extractor.json.jmespath;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/src/components/src/test/java/org/apache/jmeter/timers/TimerServiceTest.java b/src/components/src/test/java/org/apache/jmeter/timers/TimerServiceTest.java
index 6aac8f4..fa81878 100644
--- a/src/components/src/test/java/org/apache/jmeter/timers/TimerServiceTest.java
+++ b/src/components/src/test/java/org/apache/jmeter/timers/TimerServiceTest.java
@@ -20,7 +20,7 @@ package org.apache.jmeter.timers;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.CoreMatchers;
 import org.hamcrest.Description;
-import org.junit.Assert;
+import org.hamcrest.MatcherAssert;
 import org.junit.jupiter.api.Test;
 
 public class TimerServiceTest {
@@ -31,7 +31,7 @@ public class TimerServiceTest {
     public void testBigInitialDelayAndDontWait() {
         long now = System.currentTimeMillis();
         long adjustedDelay = sut.adjustDelay(Long.MAX_VALUE, now + 1000L, false);
-        Assert.assertThat("TimerService should return -1 as delay would lead to a time after
end time",
+        MatcherAssert.assertThat("TimerService should return -1 as delay would lead to a
time after end time",
                 adjustedDelay, CoreMatchers.is((long) -1));
     }
 
@@ -39,7 +39,7 @@ public class TimerServiceTest {
     public void testBigInitialDelayAndWait() {
         long now = System.currentTimeMillis();
         long adjustedDelay = sut.adjustDelay(Long.MAX_VALUE, now + 1000L);
-        Assert.assertThat("TimerService should return -1 as delay would lead to a time after
end time",
+        MatcherAssert.assertThat("TimerService should return -1 as delay would lead to a
time after end time",
                 adjustedDelay, isAlmost(1000L, 200L));
     }
 
@@ -65,13 +65,13 @@ public class TimerServiceTest {
     @Test
     public void testSmallInitialDelay() {
         long now = System.currentTimeMillis();
-        Assert.assertThat("TimerService should not change the delay as the end time is far
away",
+        MatcherAssert.assertThat("TimerService should not change the delay as the end time
is far away",
                 sut.adjustDelay(1000L, now + 20000L), CoreMatchers.is(1000L));
     }
 
     @Test
     public void testNegativeEndTime() {
-        Assert.assertThat("TimerService should not change the delay as the indicated end
time is far away",
+        MatcherAssert.assertThat("TimerService should not change the delay as the indicated
end time is far away",
                 sut.adjustDelay(1000L, -1), CoreMatchers.is(1000L));
     }
 
diff --git a/src/components/src/test/java/org/apache/jmeter/visualizers/TestSampleCompareTo.java
b/src/components/src/test/java/org/apache/jmeter/visualizers/TestSampleCompareTo.java
index c41b9e5..3fa6080 100644
--- a/src/components/src/test/java/org/apache/jmeter/visualizers/TestSampleCompareTo.java
+++ b/src/components/src/test/java/org/apache/jmeter/visualizers/TestSampleCompareTo.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.visualizers;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/src/core/src/test/java/org/apache/jmeter/report/core/CsvSampleReaderTest.java
b/src/core/src/test/java/org/apache/jmeter/report/core/CsvSampleReaderTest.java
index de4c819..f1bf97b 100644
--- a/src/core/src/test/java/org/apache/jmeter/report/core/CsvSampleReaderTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/report/core/CsvSampleReaderTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.jmeter.report.core;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.fail;
 
 import java.io.File;
@@ -62,7 +63,7 @@ public class CsvSampleReaderTest extends JMeterTestCase {
     @Test
     public void testGetMetadata() {
         try (CsvSampleReader reader = new CsvSampleReader(tempCsv, metadata)) {
-            Assert.assertThat(reader.getMetadata().toString(),
+            assertThat(reader.getMetadata().toString(),
                     CoreMatchers.is(metadata.toString()));
         }
     }
@@ -73,7 +74,7 @@ public class CsvSampleReaderTest extends JMeterTestCase {
             for (long i = 0; i < NR_ROWS; i++) {
                 Sample expected = new SampleBuilder(metadata).add(i)
                         .add("a" + i).build();
-                Assert.assertThat(reader.readSample().toString(),
+                assertThat(reader.readSample().toString(),
                         CoreMatchers.is(expected.toString()));
             }
         }
@@ -85,7 +86,7 @@ public class CsvSampleReaderTest extends JMeterTestCase {
             for (long i = 0; i < NR_ROWS; i++) {
                 Sample expected = new SampleBuilder(metadata).add(i)
                         .add("a" + i).build();
-                Assert.assertThat(reader.peek().toString(),
+                assertThat(reader.peek().toString(),
                         CoreMatchers.is(expected.toString()));
                 reader.readSample();
             }
diff --git a/src/core/src/test/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java
b/src/core/src/test/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java
index ad375ac..123d33c 100644
--- a/src/core/src/test/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/report/processor/graph/impl/CustomGraphConsumerTest.java
@@ -17,8 +17,8 @@
 
 package org.apache.jmeter.report.processor.graph.impl;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
b/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
index e3ee1bb..7e03d54 100644
--- a/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
+++ b/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
@@ -19,7 +19,7 @@ package org.apache.jmeter.samplers;
 
 import static java.lang.Boolean.FALSE;
 import static java.lang.Boolean.TRUE;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
diff --git a/src/core/src/test/java/org/apache/jmeter/testelement/property/AbstractPropertyTest.java
b/src/core/src/test/java/org/apache/jmeter/testelement/property/AbstractPropertyTest.java
index 5936864..1299092 100644
--- a/src/core/src/test/java/org/apache/jmeter/testelement/property/AbstractPropertyTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/testelement/property/AbstractPropertyTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.testelement.property;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/src/core/src/test/java/org/apache/jmeter/testelement/property/MapPropertyTest.java
b/src/core/src/test/java/org/apache/jmeter/testelement/property/MapPropertyTest.java
index d54cafe..3355f1b 100644
--- a/src/core/src/test/java/org/apache/jmeter/testelement/property/MapPropertyTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/testelement/property/MapPropertyTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.testelement.property;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.HashMap;
 import java.util.Map;
diff --git a/src/core/src/test/java/org/apache/jmeter/threads/TestUnmodifiableJMeterVariables.java
b/src/core/src/test/java/org/apache/jmeter/threads/TestUnmodifiableJMeterVariables.java
index cd313db..0cc6306 100644
--- a/src/core/src/test/java/org/apache/jmeter/threads/TestUnmodifiableJMeterVariables.java
+++ b/src/core/src/test/java/org/apache/jmeter/threads/TestUnmodifiableJMeterVariables.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.threads;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.Collections;
 import java.util.HashMap;
diff --git a/src/core/src/test/java/org/apache/jmeter/util/JSR223TestElementTest.java b/src/core/src/test/java/org/apache/jmeter/util/JSR223TestElementTest.java
index 72d485e..8872f92 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/JSR223TestElementTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/JSR223TestElementTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.util;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import org.hamcrest.CoreMatchers;
 import org.junit.jupiter.api.Test;
diff --git a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
index 358b039..e3c1af6 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
@@ -17,9 +17,9 @@
 
 package org.apache.jmeter.util;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.io.ByteArrayInputStream;
diff --git a/src/dist-check/src/test/java/org/apache/jorphan/reflect/TestClassFinder.java
b/src/dist-check/src/test/java/org/apache/jorphan/reflect/TestClassFinder.java
index 9e8308b..a8a3556 100644
--- a/src/dist-check/src/test/java/org/apache/jorphan/reflect/TestClassFinder.java
+++ b/src/dist-check/src/test/java/org/apache/jorphan/reflect/TestClassFinder.java
@@ -26,6 +26,7 @@ import org.apache.jmeter.junit.JMeterTestUtils;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.logging.log4j.LoggingException;
 import org.hamcrest.CoreMatchers;
+import org.hamcrest.MatcherAssert;
 import org.junit.Assert;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -50,7 +51,7 @@ public class TestClassFinder {
         List<String> findClassesThatExtend = ClassFinder.findClassesThatExtend(
                 libDirs,
                 new Class<?>[] { Exception.class });
-        Assert.assertThat(findClassesThatExtend, CoreMatchers.hasItem(LoggingException.class.getName()));
+        MatcherAssert.assertThat(findClassesThatExtend, CoreMatchers.hasItem(LoggingException.class.getName()));
     }
 
     @Test
@@ -71,7 +72,7 @@ public class TestClassFinder {
                 false);
         Assert.assertTrue(
                 findClassesThatExtend.stream().filter(s -> s.contains("$")).collect(Collectors.toList()).isEmpty());
-        Assert.assertThat(findClassesThatExtend, CoreMatchers.hasItem(LoggingException.class.getName()));
+        MatcherAssert.assertThat(findClassesThatExtend, CoreMatchers.hasItem(LoggingException.class.getName()));
     }
 
     @Test
diff --git a/src/functions/src/test/java/org/apache/jmeter/functions/TestRandomFromMultipleVars.java
b/src/functions/src/test/java/org/apache/jmeter/functions/TestRandomFromMultipleVars.java
index fc90ade..19b23d5 100644
--- a/src/functions/src/test/java/org/apache/jmeter/functions/TestRandomFromMultipleVars.java
+++ b/src/functions/src/test/java/org/apache/jmeter/functions/TestRandomFromMultipleVars.java
@@ -29,6 +29,7 @@ import org.apache.jmeter.threads.JMeterContext;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.hamcrest.CoreMatchers;
+import org.hamcrest.MatcherAssert;
 import org.junit.Assert;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -73,7 +74,7 @@ public class TestRandomFromMultipleVars extends JMeterTestCase {
         params.add(new CompoundVariable("var1|var2"));
         function.setParameters(params);
         String returnValue = function.execute(result, null);
-        Assert.assertThat(returnValue,
+        MatcherAssert.assertThat(returnValue,
                 CoreMatchers.anyOf(CoreMatchers.is("var1_value"),
                         CoreMatchers.is("var2_value1"),
                         CoreMatchers.is("var2_value2")));
diff --git a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
index ffe2adf..b53f7bd 100644
--- a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
+++ b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
@@ -20,8 +20,8 @@ package org.apache.jmeter.functions;
 import static org.apache.jmeter.functions.FunctionTestHelper.makeParams;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.time.LocalDate;
diff --git a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeShiftFunction.java
b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeShiftFunction.java
index 6b3bdc9..154fe70 100644
--- a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeShiftFunction.java
+++ b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeShiftFunction.java
@@ -22,7 +22,7 @@ import static org.exparity.hamcrest.date.LocalDateMatchers.sameDay;
 import static org.exparity.hamcrest.date.LocalDateTimeMatchers.within;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.time.Instant;
 import java.time.LocalDate;
diff --git a/src/jorphan/src/test/java/org/apache/jorphan/gui/MinMaxLongRendererTest.java
b/src/jorphan/src/test/java/org/apache/jorphan/gui/MinMaxLongRendererTest.java
index 3a8178a..dbb7f33 100644
--- a/src/jorphan/src/test/java/org/apache/jorphan/gui/MinMaxLongRendererTest.java
+++ b/src/jorphan/src/test/java/org/apache/jorphan/gui/MinMaxLongRendererTest.java
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
+import org.hamcrest.MatcherAssert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -59,7 +59,7 @@ public class MinMaxLongRendererTest {
             @Override
             public void setText(String text) {
                 if (afterInit.get()) {
-                    Assert.assertThat(text, CoreMatchers.is(expected));
+                    MatcherAssert.assertThat(text, CoreMatchers.is(expected));
                 }
             }
         };
diff --git a/src/jorphan/src/test/java/org/apache/jorphan/gui/ObjectTableSorterTest.java b/src/jorphan/src/test/java/org/apache/jorphan/gui/ObjectTableSorterTest.java
index 01ef68c..79a1e9a 100644
--- a/src/jorphan/src/test/java/org/apache/jorphan/gui/ObjectTableSorterTest.java
+++ b/src/jorphan/src/test/java/org/apache/jorphan/gui/ObjectTableSorterTest.java
@@ -27,9 +27,9 @@ import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.AbstractMap;
diff --git a/src/jorphan/src/test/java/org/apache/jorphan/util/TestJorphanUtils.java b/src/jorphan/src/test/java/org/apache/jorphan/util/TestJorphanUtils.java
index c540682..a17369a 100644
--- a/src/jorphan/src/test/java/org/apache/jorphan/util/TestJorphanUtils.java
+++ b/src/jorphan/src/test/java/org/apache/jorphan/util/TestJorphanUtils.java
@@ -17,9 +17,9 @@
 
 package org.apache.jorphan.util;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.nio.charset.StandardCharsets;
@@ -370,16 +370,16 @@ public class TestJorphanUtils {
 
     @Test
     public void testReplaceValueWithNullValue() {
-        Assert.assertThat(JOrphanUtils.replaceValue(null, null, false, null, null),
+        assertThat(JOrphanUtils.replaceValue(null, null, false, null, null),
                 CoreMatchers.is(0));
     }
 
     @Test
     public void testReplaceValueWithValidValueAndValidSetter() {
         Holder h = new Holder();
-        Assert.assertThat(JOrphanUtils.replaceValue("\\d+", "${port}", true, "80", s ->
h.value = s),
+        assertThat(JOrphanUtils.replaceValue("\\d+", "${port}", true, "80", s -> h.value
= s),
                 CoreMatchers.is(1));
-        Assert.assertThat(h.value, CoreMatchers.is("${port}"));
+        assertThat(h.value, CoreMatchers.is("${port}"));
     }
 
     private static class Holder {
diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestAuthorization.java
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestAuthorization.java
index af9e7d4..f88e818 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestAuthorization.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestAuthorization.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.protocol.http.control;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import org.apache.jmeter.protocol.http.control.AuthManager.Mechanism;
 import org.hamcrest.CoreMatchers;
diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
index 9494843..c30d9d7 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
@@ -17,7 +17,7 @@
 
 package org.apache.jmeter.protocol.http.parser;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
index 923d314..194f36a 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
@@ -19,8 +19,8 @@ package org.apache.jmeter.protocol.http.parser;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.collection.IsEmptyCollection.empty;
-import static org.junit.Assert.assertThat;
 
 import java.net.MalformedURLException;
 import java.net.URL;
diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestSerializedHTTPSampler.java
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestSerializedHTTPSampler.java
index abe60f5..512a4fe 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestSerializedHTTPSampler.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestSerializedHTTPSampler.java
@@ -19,7 +19,7 @@ package org.apache.jmeter.protocol.http.sampler;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.not;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.io.File;
 


Mime
View raw message