### Question:
ResourceURI { public static String format(String staticPath, final Object... args) { for (final Object arg : args) staticPath = staticPath.replaceFirst(PATH_PARAM_REGEX, arg.toString()); if (staticPath.matches(".*" + PATH_PARAM_REGEX + ".*")) throw new NotEnoughArgumentsException(staticPath); return staticPath; }  static String format(String staticPath, final Object... args);  }### Answer:
@Test public void formatPath() { String formattedPath = ResourceURI.format("/{id}/{otherId}", 1L, 2L); Assert.assertEquals("/1/2", formattedPath); }
@Test(expected = TemplateException.class) public void formatPathWithNotEnoughArgs() { ResourceURI.format("/{id}/{otherId}", 1L); }