@Test
public void testGetSnapshotTimeout() {

    TestKit kit = new TestKit(getSystem());
    ActorRef replyActor = getSystem().actorOf(ShardManagerGetSnapshotReplyActor.props(
            Arrays.asList("shard1"), "config", null, kit.getRef(), "shard-manager",
            FiniteDuration.create(100, TimeUnit.MILLISECONDS)), "testGetSnapshotTimeout");
    kit.watch(replyActor);
    Failure failure = kit.expectMsgClass(Failure.class);
    assertEquals("Failure cause type", TimeoutException.class, failure.cause().getClass());
    kit.expectTerminated(replyActor);
}