@Test public void clearForMultipleActorsThenUnregisterSpawnedActorWhenTheLastActorUnregisters() { ActorSystemInstance system = ActorSystemInstance.getInstance("5", configuration()); OwnerTwo owner = new OwnerTwo(); OwnerTwo ownerTwo = new OwnerTwo(); system.register(ownerTwo); system.register(owner); system.unregister(owner); system.unregister(ownerTwo); assertTrue(system.getActorsInjector().getInjectedActorsOwners().isEmpty()); }
@RestrictTo(RestrictTo.Scope.TESTS) Map<Actor, Set<Object>> getInjectedActorsOwners() { return injectedActorsOwners; }
ActorsInjector { @RestrictTo(RestrictTo.Scope.TESTS) Map<Actor, Set<Object>> getInjectedActorsOwners() { return injectedActorsOwners; } }
ActorsInjector { @RestrictTo(RestrictTo.Scope.TESTS) Map<Actor, Set<Object>> getInjectedActorsOwners() { return injectedActorsOwners; } ActorsInjector(ActorSystemInstance actorSystem); }
ActorsInjector { @RestrictTo(RestrictTo.Scope.TESTS) Map<Actor, Set<Object>> getInjectedActorsOwners() { return injectedActorsOwners; } ActorsInjector(ActorSystemInstance actorSystem); @RestrictTo(RestrictTo.Scope.LIBRARY) void clear(); }
ActorsInjector { @RestrictTo(RestrictTo.Scope.TESTS) Map<Actor, Set<Object>> getInjectedActorsOwners() { return injectedActorsOwners; } ActorsInjector(ActorSystemInstance actorSystem); @RestrictTo(RestrictTo.Scope.LIBRARY) void clear();  }