public boolean sendEvents(
            final Message inMessage, final Consumer<StitchResponse> resultCallback, final AsyncCallback callback) {
        sendAsyncEvents(inMessage)
                .subscribe(resultCallback, error -> {
                    // error but we continue
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Error processing async exchange with error: {}", error.getMessage());
                    }
                    inMessage.getExchange().setException(error);
                    callback.done(false);
                }, () -> {
                    // we are done from everything, so mark it as sync done
                    LOG.trace("All events with exchange have been sent successfully.");
                    callback.done(false);
                });

        return false;
    }
@Test
    void testNormalSend() {
        final StitchConfiguration configuration = new StitchConfiguration();
        configuration.setTableName("table_1");
        configuration.setStitchSchema(StitchSchema.builder().addKeyword("field_1", "string").build());
        configuration.setKeyNames("field_1");

        final StitchMessage message = StitchMessage.builder()
                .withData("field_1", "data")
                .withSequence(0)
                .build();

        final Exchange exchange = new DefaultExchange(context);
        exchange.getMessage().setBody(message);

        final StitchProducerOperations operations = new StitchProducerOperations(new TestClient(), configuration);
        final AtomicBoolean done = new AtomicBoolean(false);

        operations.sendEvents(exchange.getMessage(), response -> {
            assertEquals(200, response.getHttpStatusCode());
            assertEquals("OK", response.getStatus());
            assertEquals("All good!", response.getMessage());
            assertEquals(Collections.singletonMap("header-1", "test"), response.getHeaders());
            done.set(true);
        }, doneSync -> {
        });

        Awaitility
                .await()
                .atMost(1, TimeUnit.SECONDS)
                .pollInterval(10, TimeUnit.MILLISECONDS)
                .untilTrue(done);
    }