@Test public void shouldFilterOutWantedDeploymentsNotFinding() { assertThat(filter.apply(ListResult.of(unwanted, unwanted, unwanted))).isEmpty(); }
@Override public ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list) { if (integrationId == null) { return list; } final List<IntegrationDeployment> filtered = list.getItems().stream() .filter(i -> i.getSpec().idEquals(integrationId)).collect(Collectors.toList()); return ListResult.of(filtered); }
IntegrationIdFilter implements Function<ListResult<IntegrationDeployment>, ListResult<IntegrationDeployment>> { @Override public ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list) { if (integrationId == null) { return list; } final List<IntegrationDeployment> filtered = list.getItems().stream() .filter(i -> i.getSpec().idEquals(integrationId)).collect(Collectors.toList()); return ListResult.of(filtered); } }
IntegrationIdFilter implements Function<ListResult<IntegrationDeployment>, ListResult<IntegrationDeployment>> { @Override public ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list) { if (integrationId == null) { return list; } final List<IntegrationDeployment> filtered = list.getItems().stream() .filter(i -> i.getSpec().idEquals(integrationId)).collect(Collectors.toList()); return ListResult.of(filtered); } IntegrationIdFilter(final String integrationId); }
IntegrationIdFilter implements Function<ListResult<IntegrationDeployment>, ListResult<IntegrationDeployment>> { @Override public ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list) { if (integrationId == null) { return list; } final List<IntegrationDeployment> filtered = list.getItems().stream() .filter(i -> i.getSpec().idEquals(integrationId)).collect(Collectors.toList()); return ListResult.of(filtered); } IntegrationIdFilter(final String integrationId); @Override ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list); }
IntegrationIdFilter implements Function<ListResult<IntegrationDeployment>, ListResult<IntegrationDeployment>> { @Override public ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list) { if (integrationId == null) { return list; } final List<IntegrationDeployment> filtered = list.getItems().stream() .filter(i -> i.getSpec().idEquals(integrationId)).collect(Collectors.toList()); return ListResult.of(filtered); } IntegrationIdFilter(final String integrationId); @Override ListResult<IntegrationDeployment> apply(final ListResult<IntegrationDeployment> list);  }