IRGetClearedReleases extends IRForReleases { @Override public Collection<SW360Release> execute(SW360Connection connection) { final List<SW360SparseComponent> components = connection.getComponentAdapter().search(ComponentSearchParams.ALL_COMPONENTS); final Predicate<SW360Release> isApproved = ComplianceFeatureUtils::isApproved; return getReleasesFromComponentsByPredicate(connection, components, isApproved); }  @Override String getInfoParameter(); @Override Collection<SW360Release> execute(SW360Connection connection);  }
@Test public void executeGetClearedReleasesTest() { SW360Release release = SW360TestUtils.mkSW360Release("test"); release.setClearingState("PROJECT_APPROVED"); release.setSw360ClearingState(SW360ClearingState.REPORT_AVAILABLE); SW360Connection connection = IRForReleasesHelper.getSW360Connection(release); final IRGetClearedReleases getClearedReleases = new IRGetClearedReleases(); final Collection<SW360Release> clearedReleases = getClearedReleases.execute(connection); assertThat(clearedReleases).containsExactly(release); }