class SW360ReleaseClientAdapterAsyncImpl implements SW360ReleaseClientAdapterAsync {

    @Override
    public CompletableFuture<SW360Release> updateRelease(SW360Release release) {
        return FutureUtils.wrapInFuture(() -> {
            if (release.getId() == null) {
                throw new IllegalArgumentException("Cannot update release without ID");
            }
            return SW360ReleaseAdapterUtils.validateRelease(release);
        }, "Cannot update release for " + release.getName())
                .thenCompose(getReleaseClient()::patchRelease);
    }

    public  SW360ReleaseClientAdapterAsyncImpl(SW360ReleaseClient client,
                                              SW360ComponentClientAdapterAsync componentClientAdapter);

}