@Test
@SneakyThrows
public void shouldSelectOnlyFeatureSetsThatJobManagerSubscribedTo() {

  Store store = DataGenerator.getDefaultStore();
  Source source = DataGenerator.getDefaultSource();
  FeatureSet featureSet1 = DataGenerator.createFeatureSet(source, "default", "fs1");
  FeatureSet featureSet2 = DataGenerator.createFeatureSet(source, "project", "fs3");
  FeatureSet featureSet3 = DataGenerator.createFeatureSet(source, "default", "not-fs");
  when(specService.listFeatureSets(
          CoreServiceProto.ListFeatureSetsRequest.newBuilder()
              .setFilter(Filter.newBuilder().setFeatureSetName("*").setProject("*").build())
              .build()))
      .thenReturn(
          ListFeatureSetsResponse.newBuilder()
              .addAllFeatureSets(Lists.newArrayList(featureSet1, featureSet2, featureSet3))
              .build());
  List<FeatureSet> featureSetsForStore =
      controllerWithConsolidation.getFeatureSetsForStore(store);
  assertThat(featureSetsForStore, containsInAnyOrder(featureSet1, featureSet2));
}