test_class.declarator: KNOWN_THING_ID = ThingId.of("ditto", "myThing")
test_class.modifier: private static final
test_class.original_string: private static final ThingId KNOWN_THING_ID = ThingId.of("ditto", "myThing");
test_class.type: ThingId
test_class.var_name: KNOWN_THING_ID
test_class.declarator: actorSystem
test_class.modifier: private static
test_class.original_string: private static ActorSystem actorSystem;
test_class.type: ActorSystem
test_class.var_name: actorSystem
test_class.file: services/connectivity/messaging/src/test/java/org/eclipse/ditto/services/connectivity/messaging/ConnectivityProxyActorTest.java
test_class.identifier: ConnectivityProxyActorTest
test_case.body: @Test
      public void testRetrieveThings() {
          new TestKit(actorSystem) {{
              final Props props = ConnectivityProxyActor.props(getRef());
              final ActorRef proxy = actorSystem.actorOf(props);
  
              final List<Thing> thingList = IntStream.range(0, 10)
                      .mapToObj(i -> ThingId.of(KNOWN_THING_ID.getNamespace(), KNOWN_THING_ID.getName() + "-" + i))
                      .map(id -> Thing.newBuilder().setId(id).build())
                      .collect(Collectors.toList());
              final ThingId[] thingIdsArray =
                      thingList.stream().map(Thing::getEntityId).map(Optional::get).toArray(ThingId[]::new);
  
              final String correlationId = UUID.randomUUID().toString();
              final DittoHeaders headers =
                      DittoHeaders.newBuilder().correlationId(correlationId).contentType("application/json").build();
              final RetrieveThings retrieveThings =
                      RetrieveThings.getBuilder(thingIdsArray).dittoHeaders(headers).build();
  
              // WHEN: RetrieveThings is sent to proxy actor
              proxy.tell(retrieveThings, getRef());
  
              // THEN: command is forwarded to concierge
              expectMsg(retrieveThings);
  
              // WHEN: concierge responds with SourceRef of things
              final SourceRef<RetrieveThingResponse> retrieveThingResponseSourceRef =
                      Source.from(retrieveThings.getThingEntityIds())
                              .map(thingId -> Thing.newBuilder().setId(thingId).build())
                              .map(thing -> RetrieveThingResponse.
                                      of(thing.getEntityId().orElseThrow(), thing, DittoHeaders.empty()))
                              .runWith(StreamRefs.sourceRef(), actorSystem);
  
              getLastSender().tell(retrieveThingResponseSourceRef, ActorRef.noSender());
  
              // THEN: original sender receives
              final RetrieveThingsResponse retrieveThingsResponse = expectMsgClass(RetrieveThingsResponse.class);
  
              assertThat(retrieveThingsResponse.getThings()).containsExactlyElementsOf(thingList);
          }};
      }
test_case.class_method_signature: ConnectivityProxyActorTest.testRetrieveThings()
test_case.full_signature: @Test public void testRetrieveThings()
test_case.identifier: testRetrieveThings
test_case.invocations: props getRef actorOf collect map mapToObj range of getNamespace getName build setId newBuilder toList toArray map map stream toString randomUUID build contentType correlationId newBuilder build dittoHeaders getBuilder tell getRef expectMsg runWith map map from getThingEntityIds build setId newBuilder of orElseThrow getEntityId empty sourceRef tell getLastSender noSender expectMsgClass containsExactlyElementsOf assertThat getThings
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRetrieveThings()
focal_class.declarator: ACTOR_NAME = "connectivityProxyActor"
focal_class.modifier: public static final
focal_class.original_string: public static final String ACTOR_NAME = "connectivityProxyActor";
focal_class.type: String
focal_class.var_name: ACTOR_NAME
focal_class.declarator: log = getDiagnosticLoggingAdapter(this)
focal_class.modifier: private final
focal_class.original_string: private final DittoDiagnosticLoggingAdapter log = getDiagnosticLoggingAdapter(this);
focal_class.type: DittoDiagnosticLoggingAdapter
focal_class.var_name: log
focal_class.declarator: conciergeForwarder
focal_class.modifier: private final
focal_class.original_string: private final ActorRef conciergeForwarder;
focal_class.type: ActorRef
focal_class.var_name: conciergeForwarder
focal_class.declarator: aggregatorProxyActor
focal_class.modifier: private final
focal_class.original_string: private final ActorRef aggregatorProxyActor;
focal_class.type: ActorRef
focal_class.var_name: aggregatorProxyActor
focal_class.file: services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/ConnectivityProxyActor.java
focal_class.identifier: ConnectivityProxyActor
focal_class.class_method_signature: ConnectivityProxyActor.ConnectivityProxyActor(final ActorRef conciergeForwarder)
focal_class.full_signature: private  ConnectivityProxyActor(final ActorRef conciergeForwarder)
focal_class.identifier: ConnectivityProxyActor
focal_class.modifiers: private
focal_class.parameters: (final ActorRef conciergeForwarder)
focal_class.signature:  ConnectivityProxyActor(final ActorRef conciergeForwarder)
focal_class.class_method_signature: ConnectivityProxyActor.props(final ActorRef conciergeForwarder)
focal_class.full_signature: public static Props props(final ActorRef conciergeForwarder)
focal_class.identifier: props
focal_class.modifiers: public static
focal_class.parameters: (final ActorRef conciergeForwarder)
focal_class.return: Props
focal_class.signature: Props props(final ActorRef conciergeForwarder)
focal_class.class_method_signature: ConnectivityProxyActor.createReceive()
focal_class.full_signature: @Override public Receive createReceive()
focal_class.identifier: createReceive
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Receive
focal_class.signature: Receive createReceive()
focal_class.superclass: extends AbstractActor
focal_method.body: public static Props props(final ActorRef conciergeForwarder) {
          return Props.create(ConnectivityProxyActor.class, conciergeForwarder);
      }
focal_method.class_method_signature: ConnectivityProxyActor.props(final ActorRef conciergeForwarder)
focal_method.full_signature: public static Props props(final ActorRef conciergeForwarder)
focal_method.identifier: props
focal_method.invocations: create
focal_method.modifiers: public static
focal_method.parameters: (final ActorRef conciergeForwarder)
focal_method.return: Props
focal_method.signature: Props props(final ActorRef conciergeForwarder)