  @Test
  public void testFilterClusters() {


    final List<ClusterPlacement> clusterPlacements =
        Arrays.asList(new ClusterPlacementBuilder().clusterNumber(0).clusterGeneration(1).build(),
            new ClusterPlacementBuilder().clusterNumber(1).clusterGeneration(1).build(),
            new ClusterPlacementBuilder().clusterNumber(2).clusterGeneration(0).build());

    final Cluster cluster1 = new Cluster();
    cluster1.labels = Collections.singletonMap(SPYDRA_PLACEMENT_TOKEN_LABEL, "0-1");
    final Cluster cluster2 = new Cluster();
    cluster2.labels = Collections.singletonMap(SPYDRA_PLACEMENT_TOKEN_LABEL, "10-15");

    final List<Cluster> filterClusters =
        ClusterPlacement.filterClusters(Arrays.asList(cluster1, cluster2), clusterPlacements);

    assertThat(filterClusters, hasSize(1));
    assertThat(filterClusters, contains(cluster1));
  }