#fixed code
                                @Test
    public void TestEmptyDefaultsConfig(){
        String expectedConfigDirectory = ".";
        ServerPaths serverPaths = mock(ServerPaths.class);
        when(serverPaths.getConfigDir()).thenReturn(expectedConfigDirectory);

        SlackNotificationMainSettings whms = new SlackNotificationMainSettings(server, serverPaths);
        whms.register();
        whms.readFrom(getEmptyDefaultsConfigElement());
        String proxy = whms.getProxy();
        SlackNotificationProxyConfig whpc = whms.getProxyConfig();
        assertTrue(proxy.equals(this.proxyHost));
        assertTrue(whpc.getProxyHost().equals(this.proxyHost ));
        assertTrue(whpc.getProxyPort().equals(this.proxyPort));
        assertTrue(whms.getDefaultChannel().equals(this.defaultChannel));
        assertTrue(whms.getTeamName().equals(this.teamName));
        assertTrue(whms.getToken().equals(this.token));
        assertTrue(whms.getIconUrl().equals(this.iconUrl));
        assertTrue(whms.getBotName().equals(this.botName));
        assertNull(whms.getShowBuildAgent());
        assertNull(whms.getShowElapsedBuildTime());
        assertTrue(whms.getShowCommits());
        assertEquals(5, whms.getMaxCommitsToDisplay());
    }
#vulnerable code 
                                @Test
    public void TestEmptyDefaultsConfig(){
        String expectedConfigDirectory = ".";
        ServerPaths serverPaths = mock(ServerPaths.class);
        when(serverPaths.getConfigDir()).thenReturn(expectedConfigDirectory);

        SlackNotificationMainSettings whms = new SlackNotificationMainSettings(server, serverPaths);
        whms.register();
        whms.readFrom(getEmptyDefaultsConfigElement());
        String proxy = whms.getProxyForUrl("http://something.somecompany.com");
        SlackNotificationProxyConfig whpc = whms.getProxyConfigForUrl("http://something.somecompany.com");
        assertTrue(proxy.equals(this.proxyHost));
        assertTrue(whpc.getProxyHost().equals(this.proxyHost ));
        assertTrue(whpc.getProxyPort().equals(this.proxyPort));
        assertTrue(whms.getDefaultChannel().equals(this.defaultChannel));
        assertTrue(whms.getTeamName().equals(this.teamName));
        assertTrue(whms.getToken().equals(this.token));
        assertTrue(whms.getIconUrl().equals(this.iconUrl));
        assertTrue(whms.getBotName().equals(this.botName));
        assertNull(whms.getShowBuildAgent());
        assertNull(whms.getShowElapsedBuildTime());
        assertTrue(whms.getShowCommits());
        assertEquals(5, whms.getMaxCommitsToDisplay());
    } 
                            #location 13 
                            #vulnerability type NULL_DEREFERENCE