# Typed Actor TestKit

**URL:** <https://discuss.akka.io/t/typed-actor-testkit/4569>\
**Category:** Akka Libraries\
**Tags:** akka, akka-typed, scala, lagom\
**Created:** [July 9, 2019, 12:18am UTC](https://discuss.akka.io/t/typed-actor-testkit/4569 "2019-07-09T00:18:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reklund3](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/reklund3/32/1520_2.png) [@Reklund3](https://discuss.akka.io/u/Reklund3)\
**Post date:** [July 9, 2019, 12:18am UTC](https://discuss.akka.io/t/typed-actor-testkit/4569/1 "2019-07-09T00:18:15Z")

</div>

Hello,

I am trying to used the new Typed ActorTestKit with a custom ActorSystemSetup. In the untyped TestKit, it was easy because you could provide the actor system in the constructor:

> <https://github.com/akka/akka/blob/3bc627ad42488730e065f497b992c9700ef2141d/akka-testkit/src/main/scala/akka/testkit/TestKit.scala#L928>

But with the typed ActorTestKit you can only specify custom config settings:

> <https://github.com/akka/akka/blob/3bc627ad42488730e065f497b992c9700ef2141d/akka-actor-testkit-typed/src/main/scala/akka/actor/testkit/typed/scaladsl/ActorTestKit.scala#L73>

For reference, I am trying to use Typed actors along side Lagom Persistent Entites, and it requires you to provide a serializer for each class on actor system setup (See here: [https://www.lagomframework.com/documentation/1.5.x/scala/PersistentEntity.html#Unit-Testing](https://www.lagomframework.com/documentation/1.5.x/scala/PersistentEntity.html#Unit-Testing)).

How would I go about testing typed actor and persistent entity interactions?

Regards,

- Robert

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [July 11, 2019, 6:27am UTC](https://discuss.akka.io/t/typed-actor-testkit/4569/2 "2019-07-11T06:27:27Z")

</div>

Looks like that would require some changes and an additional factory method, please create an issue about it!

---

<div class="post-metadata">

**Author:** ![Reklund3](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/reklund3/32/1520_2.png) [@Reklund3](https://discuss.akka.io/u/Reklund3)\
**Post date:** [July 12, 2019, 4:23am UTC](https://discuss.akka.io/t/typed-actor-testkit/4569/3 "2019-07-12T04:23:36Z")

</div>

Thank you Mr. Andren. I have created an issue over in the Akka/Akka Github page.

Please see reference at: [https://github.com/akka/akka/issues/27338](https://github.com/akka/akka/issues/27338)

Regards,  
_Robert_
