diff --git a/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java b/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java index 67fa21ccb..d736f8464 100644 --- a/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java +++ b/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java @@ -71,19 +71,11 @@ import org.slf4j.LoggerFactory; import org.slf4j.bridge.SLF4JBridgeHandler; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - /** * TODO Add javadoc * * @author Apache MINA SSHD Project */ - public abstract class JUnitTestSupport extends Assertions { public static final String TEMP_SUBFOLDER_NAME = "temp"; public static final boolean OUTPUT_DEBUG_MESSAGES diff --git a/sshd-core/src/test/java/org/apache/sshd/common/global/OpenSshHostKeysHandlerTest.java b/sshd-core/src/test/java/org/apache/sshd/common/global/OpenSshHostKeysHandlerTest.java index c1f70945b..aa97d1f89 100644 --- a/sshd-core/src/test/java/org/apache/sshd/common/global/OpenSshHostKeysHandlerTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/common/global/OpenSshHostKeysHandlerTest.java @@ -37,11 +37,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - /** * @author Apache MINA SSHD Project */ @@ -109,6 +104,6 @@ protected Result handleHostKeys( SshException e = assertThrows(SshException.class, () -> handler.process(connectionService, org.apache.sshd.server.global.OpenSshHostKeysHandler.REQUEST, false, buffer)); assertFalse(handlerCalled[0], "Handler should not have been called"); - assertTrue(e.getCause() instanceof GeneralSecurityException, "Expected exception cause"); + assertInstanceOf(GeneralSecurityException.class, e.getCause(), "Expected exception cause"); } } diff --git a/sshd-netty/pom.xml b/sshd-netty/pom.xml index 534fb19af..6cfc99b34 100644 --- a/sshd-netty/pom.xml +++ b/sshd-netty/pom.xml @@ -68,6 +68,11 @@ junit-jupiter test + + org.mockito + mockito-junit-jupiter + test + org.apache.sshd sshd-core