X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetLocalSonesCommandTest.java;h=65497d99ed6598cb36b8041e8e93985d5e10d8f8;hb=2d37242d19f2e726cd402b99f935a0eba282f630;hp=0ed5204c98e49f1509fa1abcd77453fdc071378d;hpb=68cf128b60ff1e9a27964de5bc07cebe666c41c6;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/fcp/GetLocalSonesCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/GetLocalSonesCommandTest.java index 0ed5204..65497d9 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/GetLocalSonesCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/GetLocalSonesCommandTest.java @@ -19,10 +19,9 @@ package net.pterodactylus.sone.fcp; import static java.lang.String.format; import static java.util.Arrays.asList; +import static net.pterodactylus.sone.Verifiers.verifyAnswer; import static net.pterodactylus.sone.freenet.fcp.Command.AccessType.DIRECT; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; import java.util.Collection; import java.util.List; @@ -62,9 +61,7 @@ public class GetLocalSonesCommandTest { mocks.mockSone("RSone2").create(); SimpleFieldSet getLocalSonesFieldSet = new SimpleFieldSetBuilder().put("Message", "GetLocalSones").get(); Response response = getLocalSonesCommand.execute(getLocalSonesFieldSet, null, DIRECT); - assertThat(response, notNullValue()); - assertThat(response.getReplyParameters(), notNullValue()); - assertThat(response.getReplyParameters().get("Message"), is("ListLocalSones")); + verifyAnswer(response, "ListLocalSones"); Collection parsedSones = parseSones(response.getReplyParameters(), "LocalSones."); assertThat(parsedSones, matchesSones(localSones)); }