#fixed code
                              @Test
  public void testDataStreamDisabled() throws Exception {
    try {
      setup(1);
      final RaftClient client = newRaftClientForDataStream();
      exception.expect(UnsupportedOperationException.class);
      exception.expectMessage(DisabledDataStreamClientFactory.class.getName()
          + "$1 does not support streamAsync");
      // stream() will create a header request, thus it will hit UnsupportedOperationException due to
      // DisabledDataStreamFactory.
      client.getDataStreamApi().stream();
    } finally {
      shutdown();
    }
  }
#vulnerable code 
                              @Test
  public void testDataStreamDisabled() throws Exception {
    try {
      setup(1);
      final DataStreamClientImpl client = newDataStreamClientImpl();
      exception.expect(UnsupportedOperationException.class);
      exception.expectMessage(DisabledDataStreamClientFactory.class.getName()
          + "$1 does not support streamAsync");
      // stream() will create a header request, thus it will hit UnsupportedOperationException due to
      // DisabledDataStreamFactory.
      client.stream();
    } finally {
      shutdown();
    }
  } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK