@Test
public void decodingInvalidCursorsFailsWithInvalidCursorException() {

    assertThat(
            ThingsSearchCursor.decode("null", actorSystem)
                    .<Object>map(x -> x)
                    .recover(new PFBuilder<Throwable, Object>().matchAny(x -> x).build())
                    .runWith(Sink.head(), actorSystem)
                    .toCompletableFuture()
                    .join())
            .isInstanceOf(InvalidOptionException.class);
}