SW360LicenseClientAdapterAsyncImpl implements SW360LicenseClientAdapterAsync { @Override public CompletableFuture<SW360License> enrichSparseLicense(SW360SparseLicense sparseLicense) { return getLicenseClient().getLicenseByName(sparseLicense.getShortName()); } SW360LicenseClientAdapterAsyncImpl(SW360LicenseClient client); @Override SW360LicenseClient getLicenseClient(); @Override CompletableFuture<List<SW360SparseLicense>> getLicenses(); @Override CompletableFuture<Optional<SW360License>> getLicenseByName(String license); @Override CompletableFuture<SW360License> enrichSparseLicense(SW360SparseLicense sparseLicense); @Override CompletableFuture<SW360License> createLicense(SW360License license);  }
@Test public void testEnrichSparseLicense() { SW360License license = prepareLicenseClientGetLicenseByName(); SW360SparseLicense sparseLicense = new SW360SparseLicense() .setShortName(LICENSE_NAME); SW360License licenseDetails = block(licenseClientAdapter.enrichSparseLicense(sparseLicense)); assertThat(licenseDetails).isEqualTo(license); }