@@ -0,0 +1,2132 @@
+package com.orientechnologies.orient.core;%0A%0Aimport com.orientechnologies.orient.core.exception.OConfigurationException;%0Aimport com.orientechnologies.orient.core.util.OURLConnection;%0Aimport com.orientechnologies.orient.core.util.OURLHelper;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * Created by tglman on 21/02/17.%0A */%0Apublic class TestOURLHelper %7B%0A%0A  @Test%0A  public void testSimpleUrl() %7B%0A    OURLConnection parsed = OURLHelper.parse(%22plocal:/path/test/to%22);%0A    assertEquals(parsed.getType(), %22plocal%22);%0A    assertEquals(parsed.getPath(), %22/path/test%22);%0A    assertEquals(parsed.getDbName(), %22to%22);%0A%0A    parsed = OURLHelper.parse(%22memory:some%22);%0A    assertEquals(parsed.getType(), %22memory%22);%0A    //assertEquals(parsed.getPath(), %22%22);%0A    assertEquals(parsed.getDbName(), %22some%22);%0A%0A    parsed = OURLHelper.parse(%22remote:localhost/to%22);%0A    assertEquals(parsed.getType(), %22remote%22);%0A    assertEquals(parsed.getPath(), %22localhost%22);%0A    assertEquals(parsed.getDbName(), %22to%22);%0A  %7D%0A%0A  @Test%0A  public void testSimpleNewUrl() %7B%0A    OURLConnection parsed = OURLHelper.parseNew(%22plocal:/path/test/to%22);%0A    assertEquals(parsed.getType(), %22embedded%22);%0A    assertEquals(parsed.getPath(), %22/path/test%22);%0A    assertEquals(parsed.getDbName(), %22to%22);%0A%0A    parsed = OURLHelper.parseNew(%22memory:some%22);%0A    assertEquals(parsed.getType(), %22embedded%22);%0A    assertEquals(parsed.getPath(), %22%22);%0A    assertEquals(parsed.getDbName(), %22some%22);%0A%0A    parsed = OURLHelper.parseNew(%22embedded:/path/test/to%22);%0A    assertEquals(parsed.getType(), %22embedded%22);%0A    assertEquals(parsed.getPath(), %22/path/test%22);%0A    assertEquals(parsed.getDbName(), %22to%22);%0A%0A    parsed = OURLHelper.parseNew(%22remote:localhost/to%22);%0A    assertEquals(parsed.getType(), %22remote%22);%0A    assertEquals(parsed.getPath(), %22localhost%22);%0A    assertEquals(parsed.getDbName(), %22to%22);%0A%0A  %7D%0A%0A  @Test(expected = OConfigurationException.class)%0A  public void testWrongPrefix() %7B%0A    OURLHelper.parseNew(%22embd:/path/test/to%22);%0A  %7D%0A%0A  @Test(expected = OConfigurationException.class)%0A  public void testNoPrefix() %7B%0A    OURLHelper.parseNew(%22/embd/path/test/to%22);%0A  %7D%0A%0A%7D%0A

add tests for url parsing