OrientGraphUtils { public static String decodeClassName(String iClassName) { if (iClassName == null) return null; if (iClassName.charAt(0) == '-') iClassName = iClassName.substring(1); try { return URLDecoder.decode(iClassName, "UTF-8"); } catch (UnsupportedEncodingException e) { return iClassName; } }  static String encodeClassName(String iClassName); static String decodeClassName(String iClassName); static ODirection mapDirection(Direction direction); static final String CONNECTION_OUT; static final String CONNECTION_IN; }
@Test public void decode() { assertThat(decodeClassName(null), nullValue()); assertThat(decodeClassName("-01"), equalTo("01")); assertThat(decodeClassName("my+spaced+url"), equalTo("my spaced url")); assertThat(decodeClassName("UnChAnGeD"), equalTo("UnChAnGeD")); }