@Test void testFindRouteWithPortBasedUri() { List<CloudRoute> routes = List.of(route); Assertions.assertThrows(NotFoundException.class, () -> UriUtil.findRoute(routes, PORT_BASED_URI)); }
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)); }
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)); } }
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(); }
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(); static String stripScheme(String uri); static CloudRoute findRoute(List<CloudRoute> routes, String uri); static boolean routeMatchesUri(CloudRoute route, String uri); }
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(); static String stripScheme(String uri); static CloudRoute findRoute(List<CloudRoute> routes, String uri); static boolean routeMatchesUri(CloudRoute route, String uri); static final String DEFAULT_SCHEME_SEPARATOR; static final char DEFAULT_PATH_SEPARATOR; static final char DEFAULT_HOST_DOMAIN_SEPARATOR; static final int STANDARD_HTTP_PORT; static final int STANDARD_HTTPS_PORT; static final String HTTP_PROTOCOL; static final String HTTPS_PROTOCOL; }