ExternalId implements ExternalIdentifiable, ExternalIdOrBundle, Comparable<ExternalId>, Serializable { @FromString public static ExternalId parse(String str) { ArgumentChecker.notEmpty(str, "str"); str = StringUtils.replace(str, "::", "~"); int pos = str.indexOf("~"); if (pos < 0) { throw new IllegalArgumentException("Invalid identifier format: " + str); } return new ExternalId(ExternalScheme.of(str.substring(0, pos)), str.substring(pos + 1)); } private  ExternalId(ExternalScheme scheme, String value); static ExternalId of(ExternalScheme scheme, String value); static ExternalId of(String scheme, String value); @FromString static ExternalId parse(String str); ExternalScheme getScheme(); String getValue(); boolean isScheme(ExternalScheme scheme); boolean isScheme(String scheme); boolean isNotScheme(ExternalScheme scheme); boolean isNotScheme(String scheme); @Override ExternalId getExternalId(); @Override ExternalIdBundle toBundle(); @Override int compareTo(ExternalId other); @Override boolean equals(Object obj); @Override int hashCode(); @Override @ToString String toString(); @Deprecated void toFudgeMsg(final FudgeSerializer serializer, final MutableFudgeMsg msg); @Deprecated static ExternalId fromFudgeMsg(final FudgeDeserializer deserializer, final FudgeMsg msg);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_parse_invalidFormat() { ExternalId.parse("Scheme:value"); }