CallMethodRequest request = new CallMethodRequest(
objectId, methodId, new Variant[]{new Variant(input)});
return client.call(request).thenCompose(result -> {
StatusCode statusCode = result.getStatusCode();
if (statusCode.isGood()) {
<BUG>Double value = (Double) result.getOutputArguments()[0].getValue();
</BUG>
return CompletableFuture.completedFuture(value);
} else {
CompletableFuture<Double> f = new CompletableFuture<>();

CallMethodRequest request = new CallMethodRequest(
objectId, methodId, new Variant[]{new Variant(input)});
return client.call(request).thenCompose(result -> {
StatusCode statusCode = result.getStatusCode();
if (statusCode.isGood()) {
Double value = (Double) l(result.getOutputArguments()).get(0).getValue();
return CompletableFuture.completedFuture(value);
} else {
CompletableFuture<Double> f = new CompletableFuture<>();
