@Test
public void testRecoverConnections() {

    new TestKit(actorSystem) {{
        final TestProbe probe = new TestProbe(actorSystem);
        final ConnectionId connectionId1 = ConnectionId.of("connection-1");
        final ConnectionId connectionId2 = ConnectionId.of("connection-2");
        final ConnectionId connectionId3 = ConnectionId.of("connection-3");
        final Props props = ReconnectActor.props(probe.ref(),
                () -> Source.from(Arrays.asList(
                        ConnectionPersistenceActor.PERSISTENCE_ID_PREFIX + connectionId1,
                        "invalid:" + connectionId2,
                        ConnectionPersistenceActor.PERSISTENCE_ID_PREFIX + connectionId3)));
        actorSystem.actorOf(props);
        final RetrieveConnectionStatus msg1 = probe.expectMsgClass(RetrieveConnectionStatus.class);
        assertThat((CharSequence) msg1.getConnectionEntityId()).isEqualTo(connectionId1);
        final RetrieveConnectionStatus msg2 = probe.expectMsgClass(RetrieveConnectionStatus.class);
        assertThat((CharSequence) msg2.getConnectionEntityId()).isEqualTo(connectionId3);
    }};
}