diff options
Diffstat (limited to 'messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java')
-rw-r--r-- | messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java b/messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java index 76d6a1ee778..a8406cd5d1f 100644 --- a/messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java +++ b/messagebus/src/test/java/com/yahoo/messagebus/test/SimpleProtocolTestCase.java @@ -4,11 +4,9 @@ package com.yahoo.messagebus.test; import com.yahoo.component.Version; import com.yahoo.messagebus.EmptyReply; import com.yahoo.messagebus.Routable; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.*; /** * @author Simon Thoresen Hult @@ -19,45 +17,45 @@ public class SimpleProtocolTestCase { private static final SimpleProtocol PROTOCOL = new SimpleProtocol(); @Test - public void requireThatNameIsSet() { + void requireThatNameIsSet() { assertEquals(SimpleProtocol.NAME, PROTOCOL.getName()); } @Test - public void requireThatMessageCanBeEncodedAndDecoded() { + void requireThatMessageCanBeEncodedAndDecoded() { SimpleMessage msg = new SimpleMessage("foo"); byte[] buf = PROTOCOL.encode(Version.emptyVersion, msg); Routable routable = PROTOCOL.decode(Version.emptyVersion, buf); assertNotNull(routable); assertEquals(SimpleMessage.class, routable.getClass()); - msg = (SimpleMessage)routable; + msg = (SimpleMessage) routable; assertEquals("foo", msg.getValue()); } @Test - public void requireThatReplyCanBeDecoded() { + void requireThatReplyCanBeDecoded() { SimpleReply reply = new SimpleReply("foo"); byte[] buf = PROTOCOL.encode(Version.emptyVersion, reply); Routable routable = PROTOCOL.decode(Version.emptyVersion, buf); assertNotNull(routable); assertEquals(SimpleReply.class, routable.getClass()); - reply = (SimpleReply)routable; + reply = (SimpleReply) routable; assertEquals("foo", reply.getValue()); } @Test - public void requireThatUnknownRoutablesAreNotEncoded() { + void requireThatUnknownRoutablesAreNotEncoded() { assertNull(PROTOCOL.encode(VERSION, new EmptyReply())); } @Test - public void requireThatEmptyBufferIsNotDecoded() { + void requireThatEmptyBufferIsNotDecoded() { assertNull(PROTOCOL.decode(VERSION, new byte[0])); } @Test - public void requireThatUnknownBufferIsNotDecoded() { - assertNull(PROTOCOL.decode(VERSION, new byte[] { 'U' })); + void requireThatUnknownBufferIsNotDecoded() { + assertNull(PROTOCOL.decode(VERSION, new byte[]{'U'})); } } |