From 0be38d50daebe7187e026b57b38902bc53e408d6 Mon Sep 17 00:00:00 2001 From: jonmv Date: Fri, 8 Apr 2022 13:19:54 +0200 Subject: Use null rather than "" for no load balancer, as intended(?), and fix some assertions --- container-core/src/test/java/com/yahoo/restapi/PathTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'container-core') diff --git a/container-core/src/test/java/com/yahoo/restapi/PathTest.java b/container-core/src/test/java/com/yahoo/restapi/PathTest.java index 17b35a6343c..b0392c16e2e 100644 --- a/container-core/src/test/java/com/yahoo/restapi/PathTest.java +++ b/container-core/src/test/java/com/yahoo/restapi/PathTest.java @@ -68,9 +68,9 @@ public class PathTest { public void testUrlEncodedPath() { assertTrue(new Path(URI.create("/a/%62/c")).matches("/a/b/c")); assertFalse(new Path(URI.create("/a/b%2fc"), __ -> { }).matches("/a/b/c")); - assertThrows("path segments cannot be \"\", \".\", or \"..\", but got: '..'", - IllegalArgumentException.class, - () -> new Path(URI.create("/foo")).matches("/foo/bar/%2e%2e")); + assertEquals("path segments cannot be \"\", \".\", or \"..\", but got: '..'", + assertThrows(IllegalArgumentException.class, + () -> new Path(URI.create("/foo")).matches("/foo/bar/%2e%2e")).getMessage()); Path path = new Path(URI.create("/%61/%2f/%63"), __ -> { }); assertTrue(path.matches("/a/{slash}/{c}")); -- cgit v1.2.3