class SudoRetrieveThingStrategy extends AbstractThingCommandStrategy<SudoRetrieveThing> {

    @Override
    public boolean isDefined(final Context<ThingId> context, @Nullable final Thing thing,
            final SudoRetrieveThing command) {
        final boolean thingExists = Optional.ofNullable(thing)
                .map(t -> !t.isDeleted())
                .orElse(false);

        return Objects.equals(context.getState(), command.getEntityId()) && thingExists;
    }

      SudoRetrieveThingStrategy();

}