UrlTemplate { public static UrlTemplate compile(String template) { String[] urlPieces = new String[5]; int[] identifiers = new int[4]; String[] identifierFormatTags = new String[4]; int identifierCount = parseTemplate(template, urlPieces, identifiers, identifierFormatTags); return new UrlTemplate(urlPieces, identifiers, identifierFormatTags, identifierCount); } private  UrlTemplate(String[] urlPieces, int[] identifiers, String[] identifierFormatTags,
      int identifierCount); static UrlTemplate compile(String template); String buildUri(String representationId, long segmentNumber, int bandwidth, long time);  }
@Test public void testInvalidSubstitution() { String template = "$IllegalId$"; try { UrlTemplate.compile(template); fail(); } catch (IllegalArgumentException e) { } }