test_class.file: outland-feature-server/src/test/java/outland/feature/server/features/FeatureValidatorTest.java
test_class.identifier: FeatureValidatorTest
test_case.body: @Test
    public void validateFeatureThrowingBoolOptionUpdateOk() {
      Feature.Builder builder = Feature.newBuilder();
  
      OptionCollection.Builder collectionBuilder = OptionCollection.newBuilder()
          .setOption(OptionType.bool)
          .addItems(FeatureOption.newBuilder().setValue("true").setKey("true").setWeight(5500).setId("a"))
          .addItems(FeatureOption.newBuilder().setValue("false").setKey("false").setWeight(4500).setId("b"));
  
      builder.setOwner(Owner.newBuilder().setName("Jayne").setUsername("jayne"))
          .setKey("key1")
          .setGroup("app1")
          .setOptions(collectionBuilder)
      ;
  
      try {
        new FeatureValidator().validateFeatureUpdateThrowing(builder.build());
      } catch (ServiceException e) {
        fail();
      }
    }
test_case.class_method_signature: FeatureValidatorTest.validateFeatureThrowingBoolOptionUpdateOk()
test_case.full_signature: @Test public void validateFeatureThrowingBoolOptionUpdateOk()
test_case.identifier: validateFeatureThrowingBoolOptionUpdateOk
test_case.invocations: newBuilder addItems addItems setOption newBuilder setId setWeight setKey setValue newBuilder setId setWeight setKey setValue newBuilder setOptions setGroup setKey setOwner setUsername setName newBuilder validateFeatureUpdateThrowing build fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validateFeatureThrowingBoolOptionUpdateOk()
focal_class.file: outland-feature-server/src/main/java/outland/feature/server/features/FeatureValidator.java
focal_class.identifier: FeatureValidator
focal_class.class_method_signature: FeatureValidator.validateFeatureUpdateThrowing(Feature feature)
focal_class.full_signature:  void validateFeatureUpdateThrowing(Feature feature)
focal_class.identifier: validateFeatureUpdateThrowing
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateFeatureUpdateThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateFeatureRegistrationThrowing(Feature feature)
focal_class.full_signature:  void validateFeatureRegistrationThrowing(Feature feature)
focal_class.identifier: validateFeatureRegistrationThrowing
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateFeatureRegistrationThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateOwner(Owner owner)
focal_class.full_signature:  void validateOwner(Owner owner)
focal_class.identifier: validateOwner
focal_class.parameters: (Owner owner)
focal_class.return: void
focal_class.signature: void validateOwner(Owner owner)
focal_class.class_method_signature: FeatureValidator.validateFeatureDataMergeCandidates(FeatureData existing, FeatureData incoming)
focal_class.full_signature:  void validateFeatureDataMergeCandidates(FeatureData existing, FeatureData incoming)
focal_class.identifier: validateFeatureDataMergeCandidates
focal_class.parameters: (FeatureData existing, FeatureData incoming)
focal_class.return: void
focal_class.signature: void validateFeatureDataMergeCandidates(FeatureData existing, FeatureData incoming)
focal_class.class_method_signature: FeatureValidator.validateFeatureDataNewCandidateThrowing(Feature existingFeature, NamespaceFeature incoming)
focal_class.full_signature:  void validateFeatureDataNewCandidateThrowing(Feature existingFeature, NamespaceFeature incoming)
focal_class.identifier: validateFeatureDataNewCandidateThrowing
focal_class.parameters: (Feature existingFeature, NamespaceFeature incoming)
focal_class.return: void
focal_class.signature: void validateFeatureDataNewCandidateThrowing(Feature existingFeature, NamespaceFeature incoming)
focal_class.class_method_signature: FeatureValidator.validateFeatureDataUpdateCandidateThrowing(
        Feature existingFeature, NamespaceFeature incoming)
focal_class.full_signature:  void validateFeatureDataUpdateCandidateThrowing(
        Feature existingFeature, NamespaceFeature incoming)
focal_class.identifier: validateFeatureDataUpdateCandidateThrowing
focal_class.parameters: (
        Feature existingFeature, NamespaceFeature incoming)
focal_class.return: void
focal_class.signature: void validateFeatureDataUpdateCandidateThrowing(
        Feature existingFeature, NamespaceFeature incoming)
focal_class.class_method_signature: FeatureValidator.validateOptionIdsForUpdate(OptionCollection existing, OptionCollection update)
focal_class.full_signature:  void validateOptionIdsForUpdate(OptionCollection existing, OptionCollection update)
focal_class.identifier: validateOptionIdsForUpdate
focal_class.parameters: (OptionCollection existing, OptionCollection update)
focal_class.return: void
focal_class.signature: void validateOptionIdsForUpdate(OptionCollection existing, OptionCollection update)
focal_class.class_method_signature: FeatureValidator.validateOptionsThrowing(OptionCollection options)
focal_class.full_signature:  void validateOptionsThrowing(OptionCollection options)
focal_class.identifier: validateOptionsThrowing
focal_class.parameters: (OptionCollection options)
focal_class.return: void
focal_class.signature: void validateOptionsThrowing(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateBooleanOptionsThrowing(OptionCollection options)
focal_class.full_signature: private void validateBooleanOptionsThrowing(OptionCollection options)
focal_class.identifier: validateBooleanOptionsThrowing
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: void
focal_class.signature: void validateBooleanOptionsThrowing(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateFeatureDataKeysMatch(FeatureData existing, FeatureData update)
focal_class.full_signature: private void validateFeatureDataKeysMatch(FeatureData existing, FeatureData update)
focal_class.identifier: validateFeatureDataKeysMatch
focal_class.modifiers: private
focal_class.parameters: (FeatureData existing, FeatureData update)
focal_class.return: void
focal_class.signature: void validateFeatureDataKeysMatch(FeatureData existing, FeatureData update)
focal_class.class_method_signature: FeatureValidator.isBoolOption(OptionCollection options)
focal_class.full_signature: private boolean isBoolOption(OptionCollection options)
focal_class.identifier: isBoolOption
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: boolean
focal_class.signature: boolean isBoolOption(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.isStringOption(OptionCollection options)
focal_class.full_signature: private boolean isStringOption(OptionCollection options)
focal_class.identifier: isStringOption
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: boolean
focal_class.signature: boolean isStringOption(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateNamespaceFeaturesThrowing(Feature feature)
focal_class.full_signature: private void validateNamespaceFeaturesThrowing(Feature feature)
focal_class.identifier: validateNamespaceFeaturesThrowing
focal_class.modifiers: private
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateNamespaceFeaturesThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateStringOptionsThrowing(OptionCollection options)
focal_class.full_signature: private void validateStringOptionsThrowing(OptionCollection options)
focal_class.identifier: validateStringOptionsThrowing
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: void
focal_class.signature: void validateStringOptionsThrowing(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateKeysThrowing(Feature feature)
focal_class.full_signature: private void validateKeysThrowing(Feature feature)
focal_class.identifier: validateKeysThrowing
focal_class.modifiers: private
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateKeysThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateFeatureKeyThrowing(String key, Problem no_key_for_feature)
focal_class.full_signature: private void validateFeatureKeyThrowing(String key, Problem no_key_for_feature)
focal_class.identifier: validateFeatureKeyThrowing
focal_class.modifiers: private
focal_class.parameters: (String key, Problem no_key_for_feature)
focal_class.return: void
focal_class.signature: void validateFeatureKeyThrowing(String key, Problem no_key_for_feature)
focal_class.class_method_signature: FeatureValidator.validateOwnerThrowing(Feature feature)
focal_class.full_signature: private void validateOwnerThrowing(Feature feature)
focal_class.identifier: validateOwnerThrowing
focal_class.modifiers: private
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateOwnerThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateWeightsThrowing(OptionCollection options)
focal_class.full_signature: private void validateWeightsThrowing(OptionCollection options)
focal_class.identifier: validateWeightsThrowing
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: void
focal_class.signature: void validateWeightsThrowing(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateOptionsHaveIdsThrowing(Feature feature)
focal_class.full_signature: private void validateOptionsHaveIdsThrowing(Feature feature)
focal_class.identifier: validateOptionsHaveIdsThrowing
focal_class.modifiers: private
focal_class.parameters: (Feature feature)
focal_class.return: void
focal_class.signature: void validateOptionsHaveIdsThrowing(Feature feature)
focal_class.class_method_signature: FeatureValidator.validateOptionsHaveIdsThrowing(OptionCollection options)
focal_class.full_signature: private void validateOptionsHaveIdsThrowing(OptionCollection options)
focal_class.identifier: validateOptionsHaveIdsThrowing
focal_class.modifiers: private
focal_class.parameters: (OptionCollection options)
focal_class.return: void
focal_class.signature: void validateOptionsHaveIdsThrowing(OptionCollection options)
focal_class.class_method_signature: FeatureValidator.validateKeysMatch(String existingFeatureKey, String incomingKey)
focal_class.full_signature: private void validateKeysMatch(String existingFeatureKey, String incomingKey)
focal_class.identifier: validateKeysMatch
focal_class.modifiers: private
focal_class.parameters: (String existingFeatureKey, String incomingKey)
focal_class.return: void
focal_class.signature: void validateKeysMatch(String existingFeatureKey, String incomingKey)
focal_method.body: void validateFeatureUpdateThrowing(Feature feature) throws ServiceException {
  
      if (feature.hasOwner()) {
        validateOwner(feature.getOwner());
      }
  
      validateKeysThrowing(feature);
  
      if (OptionType.flag != feature.getOptions().getOption()) {
        validateOptionsHaveIdsThrowing(feature);
      }
  
      if (OptionType.flag != feature.getOptions().getOption()
          && feature.getOptions().getItemsCount() != 0) {
        // only validate options if they're sent and we're not a flag type
        validateOptionsThrowing(feature.getOptions());
  
        if (feature.hasNamespaces()) {
          validateNamespaceFeaturesThrowing(feature);
        }
      }
    }
focal_method.class_method_signature: FeatureValidator.validateFeatureUpdateThrowing(Feature feature)
focal_method.full_signature:  void validateFeatureUpdateThrowing(Feature feature)
focal_method.identifier: validateFeatureUpdateThrowing
focal_method.invocations: hasOwner validateOwner getOwner validateKeysThrowing getOption getOptions validateOptionsHaveIdsThrowing getOption getOptions getItemsCount getOptions validateOptionsThrowing getOptions hasNamespaces validateNamespaceFeaturesThrowing
focal_method.parameters: (Feature feature)
focal_method.return: void
focal_method.signature: void validateFeatureUpdateThrowing(Feature feature)