NodeExceptionTest: use lombok's val

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
Paul Campbell 2016-03-14 15:43:56 +00:00
parent 58363e474d
commit 24ad03ccab

View file

@ -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));
}