@Test public void shouldResolveTildeCharacterToHome() { System.setProperty("user.home", "/home/arquillian"); String resolvedPath = HomeResolverUtil.resolveHomeDirectoryChar("~/certs"); assertThat(resolvedPath, is("/home/arquillian/certs")); }
public static String resolveHomeDirectoryChar(String path) { if (path.startsWith("~")) { return path.replace("~", System.getProperty("user.home")); } return path; }
HomeResolverUtil { public static String resolveHomeDirectoryChar(String path) { if (path.startsWith("~")) { return path.replace("~", System.getProperty("user.home")); } return path; } }
HomeResolverUtil { public static String resolveHomeDirectoryChar(String path) { if (path.startsWith("~")) { return path.replace("~", System.getProperty("user.home")); } return path; }  }
HomeResolverUtil { public static String resolveHomeDirectoryChar(String path) { if (path.startsWith("~")) { return path.replace("~", System.getProperty("user.home")); } return path; }  static String resolveHomeDirectoryChar(String path); }
HomeResolverUtil { public static String resolveHomeDirectoryChar(String path) { if (path.startsWith("~")) { return path.replace("~", System.getProperty("user.home")); } return path; }  static String resolveHomeDirectoryChar(String path);  }