@Nullable
    private <E extends Throwable> Method extractExtendedThrowable(Class<E> exceptionType) {

        return mappedMethods.keySet()
                .stream()
                .filter(ex -> ex.isAssignableFrom(exceptionType))
                .min(new ExceptionDepthComparator(exceptionType))
                .map(mappedMethods::get)
                .orElse(null);
    }
Lookup if a method is mapped to given exception.

@param exception exception to check
@param <E> type of exception
@return true if mapped to valid method
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/advice/GrpcExceptionHandlerMethodResolver.java