@Operation(summary = "Check connection", description = "Check connection for hosts")
    @PostMapping("/check-connection")
    public ResponseEntity<Boolean> checkConnection(
            @PathVariable Long clusterId, @RequestBody @Validated HostnamesReq hostnamesReq) {
        return ResponseEntity.success(hostService.checkConnection(hostnamesReq.getHostnames()));
    }
@Test
    void checkConnectionReturnsSuccess() {
        Long clusterId = 1L;
        HostnamesReq hostnamesReq = new HostnamesReq();
        hostnamesReq.setHostnames(Arrays.asList("host1", "host2"));
        when(hostService.checkConnection(hostnamesReq.getHostnames())).thenReturn(true);

        ResponseEntity<Boolean> response = hostController.checkConnection(clusterId, hostnamesReq);

        assertTrue(response.isSuccess());
        assertTrue(response.getData());
    }