#vulnerable code 
                                @Test(expected = CommandException.class)
    public void httpClientThrowsAnException() throws IOException {
        when(httpClient.execute(any(HttpRequestBase.class))).thenThrow(new IOException("Mocked HTTP client error"));
        new AuthenticationCommand(httpClient, "http://some.url", "some-tenant", "some-user", "some-pwd").call();
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test(expected = CommandException.class)
    public void httpClientThrowsAnException() throws IOException {
        when(httpClient.execute(any(HttpRequestBase.class))).thenThrow(new IOException("Mocked HTTP client error"));
        new AuthenticationCommandImpl(httpClient, "http://some.url", "some-tenant", "some-user", "some-pwd").call();
    }