как решить проблему, мне нужно протестировать метод, но клиент каждый раз новый создается и не получается замокировать реальный запрос
public class LimitServiceGateway implements LimitService {

    private final Client limitMOService = ClientBuilder.newClient();
    private static final String LIMITS_SERVICE_ERROR_MESSAGE = "Ошибка обращения к сервису лимитов: ";

    @Autowired
    DataService dataService;

    @Autowired
    TransferPropertyService transferPropertyService;


    @Override
    public LimitOrderResponse checkLimit(LimitOrderDtoRq request) {
        try {
            log.info("Отправка запроса на проверку лимитов {}", new Gson().toJson(request));
            Response response = sendRequest(request, transferPropertyService.getTransferPropertyValue(TransferProperty.KEY_FFB_LIMIT_ORDER_URL));
            int responseCode = response.getStatusInfo().getStatusCode();
            log.info("result code " + responseCode);

            String result = response.readEntity(String.class);
            if (isEmpty(result) || responseCode != 200) {
                log.info(LIMITS_SERVICE_ERROR_MESSAGE + responseCode);
                return new LimitOrderResponse(false, responseCode, null);
            }
            log.info("Ответ от сервиса лимитов: " + result);
            return new LimitOrderResponse(true, responseCode, new Gson().fromJson(result, LimitOrderDtoRs.class));
        } catch (Exception e) {
            log.info(LIMITS_SERVICE_ERROR_MESSAGE, e);
            return new LimitOrderResponse(false, 404, null);
        }
    }


    private Response sendRequest(LimitRq request, String url) {

        Invocation invocation = limitMOService
                .target(url)
                .request(MediaType.APPLICATION_JSON)
                .buildPost(Entity.json(request));
        Response response = invocation.invoke();
        return response;
    }
}
class LimitServiceGatewayTest {


    @InjectMocks
    private LimitServiceGateway limitServiceGateway;

    @Mock
    private DataService dataService;

    @Mock
    private TransferPropertyService transferPropertyService;

    @Mock
    private Client limitMOService;

    @Mock
    private WebTarget webTarget;

    @Mock
    private Invocation invocation;

    @Mock
    private Response response;

    @BeforeEach
    public void setUp() {
        MockitoAnnotations.openMocks(this);
    }

    @Test
    public void testCheckLimit_Success() {
        // Arrange
        LimitOrderDtoRq request = new LimitOrderDtoRq();
        String url = "http://mock.url"; // mock URL
        LimitOrderDtoRs limitOrderResponse = new LimitOrderDtoRs();
        String jsonResponse = new Gson().toJson(limitOrderResponse);

        // Настройка моков
        when(transferPropertyService.getTransferPropertyValue(TransferProperty.KEY_FFB_LIMIT_ORDER_URL)).thenReturn(url);
        when(limitMOService.target(url)).thenReturn(webTarget);
        when(webTarget.request(MediaType.APPLICATION_JSON)).thenReturn(mock(Invocation.Builder.class));
        when(webTarget.request(MediaType.APPLICATION_JSON).buildPost(Entity.json(request))).thenReturn(invocation);
        when(invocation.invoke()).thenReturn(response);
        when(response.getStatusInfo()).thenReturn(mock(Response.StatusType.class));
        when(response.getStatusInfo().getStatusCode()).thenReturn(200);
        when(response.readEntity(String.class)).thenReturn(jsonResponse);

        // Act
        LimitOrderResponse result = limitServiceGateway.checkLimit(request);

        // Assert
        assertTrue(result.getSuccess());
        assertEquals(200, result.getResponseCode());
        assertEquals(limitOrderResponse, result.getResult());
    }