### Question:
ClassPathUtil { public static boolean exists(String file){ if(Boolean.parseBoolean(System.getProperty("EXEC.JAR"))){ return Paths.get(System.getProperty("EXEC.ABSOLUTE.DIR") + File.separator + file).toAbsolutePath().toFile().exists(); } try { file = file.replace("\\", "/"); return Paths.get(ClassPathUtil.class.getResource(file).toURI()).toAbsolutePath().toFile().exists(); } catch (Exception e) { return false; } }  static String getAbsolutePath(String file); static boolean exists(String file); static String path(String file);  }### Answer:
@Test public void itShouldExist() { Assert.assertTrue(ClassPathUtil.exists("/samples/readme.md")); }
@Test public void itShouldNotExist() { Assert.assertFalse(ClassPathUtil.exists("/does/not/exist.md")); }