diff --git a/core/src/test/java/cucumber/runtime/io/HelpersTest.java b/core/src/test/java/cucumber/runtime/io/HelpersTest.java index 4e0443b0ae..ab482d2356 100644 --- a/core/src/test/java/cucumber/runtime/io/HelpersTest.java +++ b/core/src/test/java/cucumber/runtime/io/HelpersTest.java @@ -25,7 +25,9 @@ protected URLConnection openConnection(URL u) throws IOException { @Test public void computes_file_path_for_file_url() throws UnsupportedEncodingException, MalformedURLException { URL url = new URL("file:/Users/First%20Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar"); - assertEquals(new File("/Users/First Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar").getAbsolutePath(), filePath(url)); + File fileFromFilePath = new File(filePath(url)); + File expectedFile = new File("/Users/First Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar"); + assertEquals(expectedFile, fileFromFilePath); } @Test