class SearchSource {

    private Source<JsonObject, NotUsed> retrieveThing(final String thingId,
            @Nullable final JsonFieldSelector selector) {
        final RetrieveThing retrieveThing = RetrieveThing.getBuilder(ThingId.of(thingId), getDittoHeaders())
                .withSelectedFields(selector)
                .build();

        final CompletionStage<Object> responseFuture =
                Patterns.ask(conciergeForwarder, retrieveThing, thingsAskTimeout);

        return Source.fromCompletionStage(responseFuture)
                .via(expectMsgClass(RetrieveThingResponse.class))
                .map(response -> response.getEntity().asObject());
    }

      SearchSource(final ActorRef pubSubMediator,
            final ActorRef conciergeForwarder,
            final Duration thingsAskTimeout,
            final Duration searchAskTimeout,
            @Nullable final JsonFieldSelector fields,
            final JsonFieldSelector sortFields,
            final StreamThings streamThings,
            final String lastThingId);

}