XmlHelper { public static String getSystemUID(String typeId) { String type; if (typeId.startsWith(SYSTEM_NAMESPACE_PREFIX)) { type = typeId.substring(SYSTEM_NAMESPACE_PREFIX.length()); } else { type = typeId; } return String.format("%s:%s", SYSTEM_NAMESPACE, type); }  static String getSystemUID(String typeId); static final String SYSTEM_NAMESPACE_PREFIX; }
@Test public void whenUIDContainsDotShouldBeconvcertedToColon() { assertThat(XmlHelper.getSystemUID("system.test"), is("system:test")); }
@Test public void whenNoPrefixIsGivenShouldPrependSystemPrefix() { assertThat(XmlHelper.getSystemUID("test"), is("system:test")); }