From 24ad03ccabca73b671a775491b444a26b357388b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 14 Mar 2016 15:43:56 +0000 Subject: [PATCH] NodeExceptionTest: use lombok's val Signed-off-by: Paul Campbell --- .../java/net/kemitix/node/NodeExceptionTest.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/test/java/net/kemitix/node/NodeExceptionTest.java b/src/test/java/net/kemitix/node/NodeExceptionTest.java index 5e9f7ac..2d1422b 100644 --- a/src/test/java/net/kemitix/node/NodeExceptionTest.java +++ b/src/test/java/net/kemitix/node/NodeExceptionTest.java @@ -1,7 +1,6 @@ package net.kemitix.node; -import net.kemitix.node.NodeException; - +import lombok.val; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; @@ -14,20 +13,15 @@ import static org.junit.Assert.assertThat; */ public class NodeExceptionTest { - /** - * Class under test. - */ - private NodeException nodeException; - /** * Test that message provided to constructor is returned. */ @Test public void shouldReturnConstructorMessage() { //given - final String message = "this is the message"; + val message = "this is the message"; //when - nodeException = new NodeException(message); + val nodeException = new NodeException(message); //then assertThat(nodeException.getMessage(), is(message)); }