test_class.declarator: clientFactory
test_class.modifier: private
test_class.original_string: private C2NiFiRegistryClient clientFactory;
test_class.type: C2NiFiRegistryClient
test_class.var_name: clientFactory
test_class.declarator: client
test_class.modifier: private
test_class.original_string: private NiFiRegistryClient client;
test_class.type: NiFiRegistryClient
test_class.var_name: client
test_class.declarator: flowSnapshotClient
test_class.modifier: private
test_class.original_string: private FlowSnapshotClient flowSnapshotClient;
test_class.type: FlowSnapshotClient
test_class.var_name: flowSnapshotClient
test_class.declarator: flowRetrievalService
test_class.modifier: private
test_class.original_string: private FlowRetrievalService flowRetrievalService;
test_class.type: FlowRetrievalService
test_class.var_name: flowRetrievalService
test_class.file: efm/efm-c2-protocol/efm-c2-protocol-framework/src/test/java/com/cloudera/cem/efm/service/flow/retrieval/TestStandardFlowRetrievalService.java
test_class.identifier: TestStandardFlowRetrievalService
test_case.body: @Test
      public void testRetrieveLatestWhenVersionsExist() throws IOException, FlowRetrievalException, NiFiRegistryException {
          final FlowUri flowUri = new FlowUri("http://localhost:18080", UUID.randomUUID().toString(), UUID.randomUUID().toString());
  
          final VersionedFlowSnapshot flowSnapshot = FlowTestUtils.createSnapshot(flowUri.getBucketId(), flowUri.getFlowId(), 2);
          when(flowSnapshotClient.getLatest(flowUri.getBucketId(), flowUri.getFlowId())).thenReturn(flowSnapshot);
  
          final VersionedFlowSnapshot returnedFlowSnapshot = flowRetrievalService.getLatestFlow(flowUri);
          assertNotNull(returnedFlowSnapshot);
          assertEquals(flowSnapshot.getSnapshotMetadata().getBucketIdentifier(), returnedFlowSnapshot.getSnapshotMetadata().getBucketIdentifier());
          assertEquals(flowSnapshot.getSnapshotMetadata().getFlowIdentifier(), returnedFlowSnapshot.getSnapshotMetadata().getFlowIdentifier());
          assertEquals(flowSnapshot.getSnapshotMetadata().getVersion(), returnedFlowSnapshot.getSnapshotMetadata().getVersion());
      }
test_case.class_method_signature: TestStandardFlowRetrievalService.testRetrieveLatestWhenVersionsExist()
test_case.full_signature: @Test public void testRetrieveLatestWhenVersionsExist()
test_case.identifier: testRetrieveLatestWhenVersionsExist
test_case.invocations: toString randomUUID toString randomUUID createSnapshot getBucketId getFlowId thenReturn when getLatest getBucketId getFlowId getLatestFlow assertNotNull assertEquals getBucketIdentifier getSnapshotMetadata getBucketIdentifier getSnapshotMetadata assertEquals getFlowIdentifier getSnapshotMetadata getFlowIdentifier getSnapshotMetadata assertEquals getVersion getSnapshotMetadata getVersion getSnapshotMetadata
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRetrieveLatestWhenVersionsExist()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(StandardFlowRetrievalService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(StandardFlowRetrievalService.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: clientFactory
focal_class.modifier: private final
focal_class.original_string: private final C2NiFiRegistryClient clientFactory;
focal_class.type: C2NiFiRegistryClient
focal_class.var_name: clientFactory
focal_class.file: efm/efm-c2-protocol/efm-c2-protocol-framework/src/main/java/com/cloudera/cem/efm/service/flow/retrieval/StandardFlowRetrievalService.java
focal_class.identifier: StandardFlowRetrievalService
focal_class.interfaces: implements FlowRetrievalService
focal_class.class_method_signature: StandardFlowRetrievalService.StandardFlowRetrievalService(final C2NiFiRegistryClient clientFactory)
focal_class.full_signature: @Autowired public  StandardFlowRetrievalService(final C2NiFiRegistryClient clientFactory)
focal_class.identifier: StandardFlowRetrievalService
focal_class.modifiers: @Autowired public
focal_class.parameters: (final C2NiFiRegistryClient clientFactory)
focal_class.signature:  StandardFlowRetrievalService(final C2NiFiRegistryClient clientFactory)
focal_class.class_method_signature: StandardFlowRetrievalService.getVersions(final FlowUri flowUri)
focal_class.full_signature: @Override public List<VersionedFlowSnapshotMetadata> getVersions(final FlowUri flowUri)
focal_class.identifier: getVersions
focal_class.modifiers: @Override public
focal_class.parameters: (final FlowUri flowUri)
focal_class.return: List<VersionedFlowSnapshotMetadata>
focal_class.signature: List<VersionedFlowSnapshotMetadata> getVersions(final FlowUri flowUri)
focal_class.class_method_signature: StandardFlowRetrievalService.getFlow(final FlowUri flowUri, final int version)
focal_class.full_signature: @Override public VersionedFlowSnapshot getFlow(final FlowUri flowUri, final int version)
focal_class.identifier: getFlow
focal_class.modifiers: @Override public
focal_class.parameters: (final FlowUri flowUri, final int version)
focal_class.return: VersionedFlowSnapshot
focal_class.signature: VersionedFlowSnapshot getFlow(final FlowUri flowUri, final int version)
focal_class.class_method_signature: StandardFlowRetrievalService.getLatestFlow(final FlowUri flowUri)
focal_class.full_signature: @Override public VersionedFlowSnapshot getLatestFlow(final FlowUri flowUri)
focal_class.identifier: getLatestFlow
focal_class.modifiers: @Override public
focal_class.parameters: (final FlowUri flowUri)
focal_class.return: VersionedFlowSnapshot
focal_class.signature: VersionedFlowSnapshot getLatestFlow(final FlowUri flowUri)
focal_method.body: @Override
      public VersionedFlowSnapshot getLatestFlow(final FlowUri flowUri)
              throws IOException, FlowRetrievalException {
  
          if (flowUri == null) {
              throw new IllegalArgumentException("FlowUri cannot be null");
          }
  
          if (LOGGER.isTraceEnabled()) {
              LOGGER.trace("Getting latest flow for {}", new Object[] {flowUri});
          }
  
          final NiFiRegistryClient client = clientFactory.getClient();
          try {
              return client.getFlowSnapshotClient().getLatest(flowUri.getBucketId(), flowUri.getFlowId());
          } catch (IOException ioe) {
              throw ioe;
          } catch (NiFiRegistryException nre) {
              throw new FlowRetrievalException("Error retrieving latest flow for " + flowUri + ": " + nre.getMessage(), nre);
          }
      }
focal_method.class_method_signature: StandardFlowRetrievalService.getLatestFlow(final FlowUri flowUri)
focal_method.full_signature: @Override public VersionedFlowSnapshot getLatestFlow(final FlowUri flowUri)
focal_method.identifier: getLatestFlow
focal_method.invocations: isTraceEnabled trace getClient getLatest getFlowSnapshotClient getBucketId getFlowId getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (final FlowUri flowUri)
focal_method.return: VersionedFlowSnapshot
focal_method.signature: VersionedFlowSnapshot getLatestFlow(final FlowUri flowUri)