test_class.file: efm/efm-flow-designer/efm-flow-designer-framework/src/test/java/com/cloudera/cem/efm/validation/TestDescriptorUtils.java
test_class.identifier: TestDescriptorUtils
test_case.body: @Test
      public void testNoAllowables() {
          PropertyDescriptor desc = TestPropertyValidationContext.createDescriptor("boolean", true, Lists.newArrayList(), "false");
          desc.setValidator("BOOLEAN_VALIDATOR");
          desc.setDescription("oh description");
          desc.setSensitive(true);
          org.apache.nifi.components.PropertyDescriptor otherDescriptor = DescriptorUtils.toComponentDescriptor(desc);
  
          // can't use a reflection equals since they are different types
          assertEquals(desc.getDefaultValue(),otherDescriptor.getDefaultValue());
          assertEquals(desc.getDescription(),otherDescriptor.getDescription());
          assertEquals(desc.getDisplayName(),otherDescriptor.getDisplayName());
          assertEquals(desc.getName(),otherDescriptor.getName());
          assertEquals(desc.getSensitive(),otherDescriptor.isSensitive());
          assertEquals(desc.getRequired(),otherDescriptor.isRequired());
      }
test_case.class_method_signature: TestDescriptorUtils.testNoAllowables()
test_case.full_signature: @Test public void testNoAllowables()
test_case.identifier: testNoAllowables
test_case.invocations: createDescriptor newArrayList setValidator setDescription setSensitive toComponentDescriptor assertEquals getDefaultValue getDefaultValue assertEquals getDescription getDescription assertEquals getDisplayName getDisplayName assertEquals getName getName assertEquals getSensitive isSensitive assertEquals getRequired isRequired
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNoAllowables()
focal_class.file: efm/efm-flow-designer/efm-flow-designer-framework/src/main/java/com/cloudera/cem/efm/validation/DescriptorUtils.java
focal_class.identifier: DescriptorUtils
focal_class.class_method_signature: DescriptorUtils.toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_class.full_signature: public static final org.apache.nifi.components.PropertyDescriptor toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_class.identifier: toComponentDescriptor
focal_class.modifiers: public static final
focal_class.parameters: (
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_class.return: org.apache.nifi.components.PropertyDescriptor
focal_class.signature: org.apache.nifi.components.PropertyDescriptor toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_method.body: public static final org.apache.nifi.components.PropertyDescriptor toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor) {
          Set<String> allowableValues = new HashSet<>();
          if (null != descriptor.getAllowableValues())
          descriptor.getAllowableValues().stream().map(e -> e.getValue()).forEach(allowableValues::add);
          org.apache.nifi.components.PropertyDescriptor desc = new org.apache.nifi.components.PropertyDescriptor.Builder()
                  .defaultValue(descriptor.getDefaultValue())
                  .description(descriptor.getDescription())
                  .dynamic(descriptor.isDynamic())
                  .required(descriptor.getRequired())
                  .sensitive(descriptor.getSensitive())
                  .name(descriptor.getName())
                  .displayName(descriptor.getDisplayName())
                  .allowableValues(allowableValues.isEmpty() ? null : allowableValues).dynamic(descriptor.isDynamic())
                  .build();
          return desc;
      }
focal_method.class_method_signature: DescriptorUtils.toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_method.full_signature: public static final org.apache.nifi.components.PropertyDescriptor toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_method.identifier: toComponentDescriptor
focal_method.invocations: getAllowableValues forEach map stream getAllowableValues getValue build dynamic allowableValues displayName name sensitive required dynamic description defaultValue getDefaultValue getDescription isDynamic getRequired getSensitive getName getDisplayName isEmpty isDynamic
focal_method.modifiers: public static final
focal_method.parameters: (
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)
focal_method.return: org.apache.nifi.components.PropertyDescriptor
focal_method.signature: org.apache.nifi.components.PropertyDescriptor toComponentDescriptor(
              com.cloudera.cem.efm.model.extension.PropertyDescriptor descriptor)