summaryrefslogtreecommitdiffstats
path: root/jrt/tests
diff options
context:
space:
mode:
Diffstat (limited to 'jrt/tests')
-rw-r--r--jrt/tests/com/yahoo/jrt/TlsDetectionTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java b/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
index 9bd37e25772..db7dba313b4 100644
--- a/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
+++ b/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
@@ -1,6 +1,8 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;
+import static org.junit.Assert.assertEquals;
+
public class TlsDetectionTest {
static private String message(byte[] data, boolean actual) {
@@ -24,9 +26,7 @@ public class TlsDetectionTest {
data[i] = (byte) values[i];
}
boolean actual = MaybeTlsCryptoSocket.looksLikeTlsToMe(data);
- if(actual != expect) {
- throw new AssertionError(message(data, actual));
- }
+ assertEquals(message(data, actual), expect, actual);
}
@org.junit.Test public void testValidHandshake() {