test_class.file: efm/efm-c2-protocol/efm-c2-protocol-framework/src/test/java/com/cloudera/cem/efm/service/flow/transform/TestConfigSchemaFlowTransformService.java
test_class.identifier: TestConfigSchemaFlowTransformService
test_case.body: @Test
      public void testTransform() throws FlowTransformException {
          final VersionedFlowSnapshotMetadata snapshotMetadata = new VersionedFlowSnapshotMetadata();
          snapshotMetadata.setBucketIdentifier("bucket 1");
          snapshotMetadata.setFlowIdentifier("flow 2");
          snapshotMetadata.setVersion(1);
          snapshotMetadata.setComments("This is snapshot #1");
  
          final VersionedProcessGroup root = new VersionedProcessGroup();
          root.setIdentifier("root");
          root.setName("Root");
  
          final Map<String,String> props = new HashMap<>();
          props.put("Property 1", "Value 1");
  
          final Map<String, VersionedPropertyDescriptor> propDescriptors = new HashMap<>();
  
          final VersionedPropertyDescriptor propDescriptor1 = new VersionedPropertyDescriptor();
          propDescriptor1.setName("Property 1");
          propDescriptors.put(propDescriptor1.getName(), propDescriptor1);
  
          final VersionedProcessor proc1 = new VersionedProcessor();
          proc1.setIdentifier("p1");
          proc1.setName("Processor 1");
          proc1.setProperties(props);
          proc1.setPropertyDescriptors(propDescriptors);
  
          root.getProcessors().add(proc1);
  
          final VersionedFlowSnapshot snapshot = new VersionedFlowSnapshot();
          snapshot.setSnapshotMetadata(snapshotMetadata);
          snapshot.setFlowContents(root);
  
          // test the transform
          final FlowTransformService<ConfigSchema> transformService = new ConfigSchemaFlowTransformService();
          final ConfigSchema configSchema = transformService.transform(snapshot);
  
          Assert.assertNotNull(configSchema);
          Assert.assertNotNull(configSchema.getProcessGroupSchema());
          Assert.assertNotNull(configSchema.getProcessGroupSchema().getProcessors());
          Assert.assertEquals(1, configSchema.getProcessGroupSchema().getProcessors().size());
      }
test_case.class_method_signature: TestConfigSchemaFlowTransformService.testTransform()
test_case.full_signature: @Test public void testTransform()
test_case.identifier: testTransform
test_case.invocations: setBucketIdentifier setFlowIdentifier setVersion setComments setIdentifier setName put setName put getName setIdentifier setName setProperties setPropertyDescriptors add getProcessors setSnapshotMetadata setFlowContents transform assertNotNull assertNotNull getProcessGroupSchema assertNotNull getProcessors getProcessGroupSchema assertEquals size getProcessors getProcessGroupSchema
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTransform()
focal_class.file: efm/efm-c2-protocol/efm-c2-protocol-framework/src/main/java/com/cloudera/cem/efm/service/flow/transform/ConfigSchemaFlowTransformService.java
focal_class.identifier: ConfigSchemaFlowTransformService
focal_class.interfaces: implements FlowTransformService<ConfigSchema>
focal_class.class_method_signature: ConfigSchemaFlowTransformService.transform(final VersionedFlowSnapshot versionedFlowSnapshot)
focal_class.full_signature: @Override public ConfigSchema transform(final VersionedFlowSnapshot versionedFlowSnapshot)
focal_class.identifier: transform
focal_class.modifiers: @Override public
focal_class.parameters: (final VersionedFlowSnapshot versionedFlowSnapshot)
focal_class.return: ConfigSchema
focal_class.signature: ConfigSchema transform(final VersionedFlowSnapshot versionedFlowSnapshot)
focal_method.body: @Override
      public ConfigSchema transform(final VersionedFlowSnapshot versionedFlowSnapshot) throws FlowTransformException {
          if (versionedFlowSnapshot == null) {
              throw new IllegalArgumentException("VersionedFlowSnapshot cannot be null");
          }
  
          try {
              return ConfigMain.transformVersionedFlowSnapshotToSchema(versionedFlowSnapshot);
          } catch (Exception e) {
              throw new FlowTransformException("Unable to transform flow due to: " + e.getMessage(), e);
          }
      }
focal_method.class_method_signature: ConfigSchemaFlowTransformService.transform(final VersionedFlowSnapshot versionedFlowSnapshot)
focal_method.full_signature: @Override public ConfigSchema transform(final VersionedFlowSnapshot versionedFlowSnapshot)
focal_method.identifier: transform
focal_method.invocations: transformVersionedFlowSnapshotToSchema getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (final VersionedFlowSnapshot versionedFlowSnapshot)
focal_method.return: ConfigSchema
focal_method.signature: ConfigSchema transform(final VersionedFlowSnapshot versionedFlowSnapshot)