EntityLinkUtilities { public static String mkExternalIdLink(String baseUrl, EntityKind kind, String externalId) { checkNotNull(baseUrl, "baseUrl cannot be null"); checkNotNull(kind, "kind cannot be null"); checkNotEmpty(externalId, "externalId cannot be null"); return mkPath(baseUrl, "entity", kind.name(), "external-id", externalId); }  static String mkIdLink(String baseUrl, EntityKind kind, Long id); static String mkExternalIdLink(String baseUrl, EntityKind kind, String externalId);  }
@Test public void external() { String path = EntityLinkUtilities.mkExternalIdLink("test/", EntityKind.APPLICATION, "foo"); assertEquals("test/entity/APPLICATION/external-id/foo", path); }