X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FAbstractSoneCommandTest.java;h=d510ab6ed934bf2f1b93275c72484ae1fc5f9b09;hb=a05ce7308e3cc981f97756a374e1a5bb0f34e51d;hp=dab94a44f28332f724a4ced12e1913a8f6e5d94a;hpb=7662db855611501efe295eece8ab1bca3773722d;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/fcp/AbstractSoneCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/AbstractSoneCommandTest.java index dab94a4..d510ab6 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/AbstractSoneCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/AbstractSoneCommandTest.java @@ -270,10 +270,12 @@ public class AbstractSoneCommandTest { assertThat(parsedSone.isPresent(), is(false)); } - @Test(expected = FcpException.class) - public void testParsingAnOptionalSoneFromANonExistingFieldCausesAnError() throws FcpException { + @Test + public void testParsingAnOptionalSoneFromANonExistingField() throws FcpException { SimpleFieldSet soneFieldSet = new SimpleFieldSetBuilder().put("Sone", "jXH8d-eFdm14R69WyaCgQoSjaY0jl-Ut6etlXjK0e6E").get(); - abstractSoneCommand.getOptionalSone(soneFieldSet, "RealSone"); + Optional sone = abstractSoneCommand.getOptionalSone(soneFieldSet, "RealSone"); + assertThat(sone, notNullValue()); + assertThat(sone.isPresent(), is(false)); } @Test