ThingsSearchCursor { static Source<ThingsSearchCursor, NotUsed> decode(final String cursorString, final ActorSystem system) { return Source.fromCompletionStage(decodeCS(cursorString, system)).mapError(DECODE_ERROR_MAPPER); } ThingsSearchCursor(@Nullable final Set<String> namespaces, @Nullable final String correlationId,
            final SortOption sortOption, @Nullable final String filter, final JsonArray values); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object that);  }
@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); }