@Test public void clearForMultipleActorsThenDoNotUnregisterSpawnedActorWhenTheLastActorIsNotUnregistered() { ActorSystemInstance system = ActorSystemInstance.getInstance("5", configuration()); OwnerOne owner = new OwnerOne(); OwnerTwo ownerTwo = new OwnerTwo(); system.register(ownerTwo); system.register(owner); system.unregister(owner); assertTrue(system.getActorsInjector().getInjectedActorsOwners().size() == 1 && containsOwner(system.getActorsInjector().getInjectedActorsOwners(), ownerTwo)); }
@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();  }