@Test
public void shouldThrowExceptionForFeatureSetLabelsWithAnEmptyKey() {

  Map<String, String> featureSetLabels =
      new HashMap<>() {
        {
          put("", "empty_key");
        }
      };
  FeatureSetProto.FeatureSetSpec featureSetSpec =
      FeatureSetProto.FeatureSetSpec.newBuilder()
          .setProject("project1")
          .setName("featureSetWithConstraints")
          .putAllLabels(featureSetLabels)
          .build();
  FeatureSetProto.FeatureSet featureSet =
      FeatureSetProto.FeatureSet.newBuilder().setSpec(featureSetSpec).build();
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage("Feature set label keys must not be empty");
  FeatureSetValidator.validateSpec(featureSet);
}