@Test
public void testFindLocalShardWithShardFound() {

    final TestKit testKit = new TestKit(getSystem());
    testKit.within(Duration.ofSeconds(1), () -> {
        ActorRef shardActorRef = getSystem().actorOf(Props.create(EchoActor.class));
        ActorRef shardManagerActorRef = getSystem().actorOf(MockShardManager.props(true, shardActorRef));
        ActorUtils actorUtils = new ActorUtils(getSystem(), shardManagerActorRef,
            mock(ClusterWrapper.class), mock(Configuration.class));
        Optional<ActorRef> out = actorUtils.findLocalShard("default");
        assertEquals(shardActorRef, out.get());
        testKit.expectNoMessage();
        return null;
    });
}