@Test public void testAppend() { final Object[][] testParameters = new Object[][] {{new String[] {"/Users"}, "/Users"}, {new String[] {"/Users", "/tester"}, "/Users/tester"}, {new String[] {"/Users", "/admin", "/systems"}, "/Users/admin/systems"}, {new String[] {"/Users", "/admin", "/systems", "/subsystem"}, "/Users/admin/systems/subsystem"}}; try { FilepathUtils.append((String[]) null); } catch (Exception e) { assertSame(NullPointerException.class, e.getClass()); } for (Object[] testParameter : testParameters) { String expected = (String) testParameter[1]; String[] fragments = (String[]) testParameter[0]; assertEquals(expected, FilepathUtils.append(fragments)); } }
public static String append(final String... fragments) { return append(fragments, 0, fragments.length - 1); }
FilepathUtils { public static String append(final String... fragments) { return append(fragments, 0, fragments.length - 1); } }
FilepathUtils { public static String append(final String... fragments) { return append(fragments, 0, fragments.length - 1); }  }
FilepathUtils { public static String append(final String... fragments) { return append(fragments, 0, fragments.length - 1); }  static String[] getCanonicalFragments(final String path); static String getCanonicalForm(final String path); static String[] split(final String path); static String getParentPath(final String path); static String getFilename(final String path); static String concat(final String... fragments); static String append(final String... fragments); static String append(final String[] fragments, final int start, final int end); }
FilepathUtils { public static String append(final String... fragments) { return append(fragments, 0, fragments.length - 1); }  static String[] getCanonicalFragments(final String path); static String getCanonicalForm(final String path); static String[] split(final String path); static String getParentPath(final String path); static String getFilename(final String path); static String concat(final String... fragments); static String append(final String... fragments); static String append(final String[] fragments, final int start, final int end);  }