test_class.file: src/server/src/test/java/io/cassandrareaper/service/StreamServiceTest.java
test_class.identifier: StreamServiceTest
test_case.body: @Test
    public void testListStreams() throws ReaperException, ClassNotFoundException, InterruptedException {
      JmxProxy proxy = JmxProxyTest.mockJmxProxyImpl();
      StreamManagerMBean streamingManagerMBean = Mockito.mock(StreamManagerMBean.class);
      JmxProxyTest.mockGetStreamManagerMBean(proxy, streamingManagerMBean);
  
      AppContext cxt = new AppContext();
      cxt.config = TestRepairConfiguration.defaultConfig();
      cxt.jmxConnectionFactory = mock(JmxConnectionFactory.class);
      when(cxt.jmxConnectionFactory.connectAny(Mockito.anyList())).thenReturn(proxy);
      ClusterFacade clusterFacadeSpy = Mockito.spy(ClusterFacade.create(cxt));
      Mockito.doReturn("dc1").when(clusterFacadeSpy).getDatacenter(any());
  
      StreamService
          .create(() -> clusterFacadeSpy)
          .listStreams(Node.builder().withHostname("127.0.0.1").build());
  
      verify(streamingManagerMBean, times(1)).getCurrentStreams();
    }
test_case.class_method_signature: StreamServiceTest.testListStreams()
test_case.full_signature: @Test public void testListStreams()
test_case.identifier: testListStreams
test_case.invocations: mockJmxProxyImpl mock mockGetStreamManagerMBean defaultConfig mock thenReturn when connectAny anyList spy create getDatacenter when doReturn any listStreams create build withHostname builder getCurrentStreams verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testListStreams()
focal_class.declarator: LOG = LoggerFactory.getLogger(StreamService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(StreamService.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: clusterFacade
focal_class.modifier: private final
focal_class.original_string: private final ClusterFacade clusterFacade;
focal_class.type: ClusterFacade
focal_class.var_name: clusterFacade
focal_class.file: src/server/src/main/java/io/cassandrareaper/service/StreamService.java
focal_class.identifier: StreamService
focal_class.class_method_signature: StreamService.StreamService(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.full_signature: private  StreamService(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.identifier: StreamService
focal_class.modifiers: private
focal_class.parameters: (Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.signature:  StreamService(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.class_method_signature: StreamService.create(AppContext context)
focal_class.full_signature: public static StreamService create(AppContext context)
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: (AppContext context)
focal_class.return: StreamService
focal_class.signature: StreamService create(AppContext context)
focal_class.class_method_signature: StreamService.create(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.full_signature: static StreamService create(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.identifier: create
focal_class.modifiers: static
focal_class.parameters: (Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.return: StreamService
focal_class.signature: StreamService create(Supplier<ClusterFacade> clusterFacadeSupplier)
focal_class.class_method_signature: StreamService.listStreams(Node node)
focal_class.full_signature: public List<StreamSession> listStreams(Node node)
focal_class.identifier: listStreams
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: List<StreamSession>
focal_class.signature: List<StreamSession> listStreams(Node node)
focal_class.class_method_signature: StreamService.pullStreamInfo(Node node)
focal_class.full_signature: private List<StreamSession> pullStreamInfo(Node node)
focal_class.identifier: pullStreamInfo
focal_class.modifiers: private
focal_class.parameters: (Node node)
focal_class.return: List<StreamSession>
focal_class.signature: List<StreamSession> pullStreamInfo(Node node)
focal_method.body: public List<StreamSession> listStreams(Node node) throws ReaperException {
      try {
        LOG.debug("Pulling streams for node {}", node);
        return pullStreamInfo(node);
      } catch (ReaperException | InterruptedException | IOException e) {
        LOG.info("Pulling streams failed: {}", e.getMessage());
        throw new ReaperException(e);
      }
    }
focal_method.class_method_signature: StreamService.listStreams(Node node)
focal_method.full_signature: public List<StreamSession> listStreams(Node node)
focal_method.identifier: listStreams
focal_method.invocations: debug pullStreamInfo info getMessage
focal_method.modifiers: public
focal_method.parameters: (Node node)
focal_method.return: List<StreamSession>
focal_method.signature: List<StreamSession> listStreams(Node node)