IRGetNotClearedReleases extends IRForReleases { @Override public Collection<SW360Release> execute(SW360Connection connection) { final List<SW360SparseComponent> components = connection.getComponentAdapter().search(ComponentSearchParams.ALL_COMPONENTS); final Predicate<SW360Release> releasePredicate = sw360release -> !ComplianceFeatureUtils.isApproved(sw360release); return getReleasesFromComponentsByPredicate(connection, components, releasePredicate); }  @Override String getInfoParameter(); @Override Collection<SW360Release> execute(SW360Connection connection);  }
@Test public void executeGetNotClearedReleasesTest() { SW360Release release = SW360TestUtils.mkSW360Release("test"); release.setClearingState("INITIAL"); SW360Connection connection = IRForReleasesHelper.getSW360Connection(release); final IRGetNotClearedReleases getNotClearedReleases = new IRGetNotClearedReleases(); final Collection<SW360Release> notClearedReleases = getNotClearedReleases.execute(connection); assertThat(notClearedReleases).containsExactly(release); }