From 098b0ff4bdc38fd018a52fea71134af7aed2f8bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 4 Nov 2013 06:45:14 +0100 Subject: [PATCH] Use method from Verifiers. --- src/test/java/net/pterodactylus/sone/fcp/VersionCommandTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/pterodactylus/sone/fcp/VersionCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/VersionCommandTest.java index 667ca54..bdfd31e 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/VersionCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/VersionCommandTest.java @@ -17,11 +17,11 @@ package net.pterodactylus.sone.fcp; +import static net.pterodactylus.sone.fcp.Verifiers.verifyAnswer; import static net.pterodactylus.sone.freenet.fcp.Command.AccessType.DIRECT; import static net.pterodactylus.sone.main.SonePlugin.VERSION; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; import net.pterodactylus.sone.data.Mocks; import net.pterodactylus.sone.freenet.SimpleFieldSetBuilder; @@ -45,9 +45,7 @@ public class VersionCommandTest { public void theCorrectVersionNumberIsReturned() { SimpleFieldSet versionFieldSet = new SimpleFieldSetBuilder().put("Message", "Version").get(); Response response = versionCommand.execute(versionFieldSet, null, DIRECT); - assertThat(response, notNullValue()); - assertThat(response.getReplyParameters(), notNullValue()); - assertThat(response.getReplyParameters().get("Message"), is("Version")); + verifyAnswer(response, "Version"); assertThat(response.getReplyParameters().get("Version"), is(VERSION.toString())); } -- 2.7.4