@@ -0,0 +1,2598 @@
+package net.kencochrane.raven;%0A%0Aimport net.kencochrane.raven.exception.InvalidDsnException;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class DsnTest %7B%0A    @Test(expected = InvalidDsnException.class)%0A    public void testEmptyDsnInvalid() %7B%0A        new Dsn(%22%22);%0A    %7D%0A%0A    @Test%0A    public void testSimpleDsnValid() %7B%0A        Dsn dsn = new Dsn(%22http://publicKey:secretKey@host/9%22);%0A%0A        assertEquals(%22http%22, dsn.getProtocol());%0A        assertEquals(%22publicKey%22, dsn.getPublicKey());%0A        assertEquals(%22secretKey%22, dsn.getSecretKey());%0A        assertEquals(%22host%22, dsn.getHost());%0A        assertEquals(%22/%22, dsn.getPath());%0A        assertEquals(%229%22, dsn.getProjectId());%0A    %7D%0A%0A    @Test(expected = InvalidDsnException.class)%0A    public void testMissingSecretKeyInvalid() %7B%0A        new Dsn(%22http://publicKey:@host/9%22);%0A    %7D%0A%0A    @Test(expected = InvalidDsnException.class)%0A    public void testMissingHostInvalid() %7B%0A        new Dsn(%22http://publicKey:secretKey@/9%22);%0A    %7D%0A%0A    @Test(expected = InvalidDsnException.class)%0A    public void testMissingPathInvalid() %7B%0A        new Dsn(%22http://publicKey:secretKey@host%22);%0A    %7D%0A%0A    @Test(expected = InvalidDsnException.class)%0A    public void testMissingProjectIdInvalid() %7B%0A        new Dsn(%22http://publicKey:secretKey@host/%22);%0A    %7D%0A%0A    @Test%0A    public void testAdvancedDsnValid() %7B%0A        Dsn dsn = new Dsn(%22naive+udp://1234567890:0987654321@complete.host.name:1234%22 +%0A                %22/composed/path/1029384756?option1&option2=valueOption2%22);%0A%0A        assertEquals(%22udp%22, dsn.getProtocol());%0A        assertTrue(dsn.getProtocolSettings().contains(%22naive%22));%0A        assertEquals(%221234567890%22, dsn.getPublicKey());%0A        assertEquals(%220987654321%22, dsn.getSecretKey());%0A        assertEquals(%22complete.host.name%22, dsn.getHost());%0A        assertEquals(1234, dsn.getPort());%0A        assertEquals(%22/composed/path/%22, dsn.getPath());%0A        assertEquals(%221029384756%22, dsn.getProjectId());%0A        assertTrue(dsn.getOptions().containsKey(%22option1%22));%0A        assertEquals(%22valueOption2%22, dsn.getOptions().get(%22option2%22));%0A    %7D%0A%0A    @Test(expected = UnsupportedOperationException.class)%0A    public void testOptionsImmutable() %7B%0A        Dsn dsn = new Dsn(%22http://publicKey:secretKey@host/9%22);%0A%0A        dsn.getOptions().put(%22test%22, %22test%22);%0A    %7D%0A%0A    @Test(expected = UnsupportedOperationException.class)%0A    public void testProtocolSettingsImmutable() %7B%0A        Dsn dsn = new Dsn(%22http://publicKey:secretKey@host/9%22);%0A%0A        dsn.getProtocolSettings().add(%22test%22);%0A    %7D%0A%7D%0A

Add unit tests for DSN creation