class UriUtil {

    public static CloudRoute findRoute(List<CloudRoute> routes, String uri) {
        return routes.stream()
                     .filter(route -> routeMatchesUri(route, uri))
                     .findAny()
                     .orElseThrow(() -> new NotFoundException(Messages.ROUTE_NOT_FOUND, uri));
    }

    private  UriUtil();

}