class ConnectToRandomCoreServerStrategy extends UpstreamDatabaseSelectionStrategy {

    @Override
    public Optional<MemberId> upstreamDatabase() throws UpstreamDatabaseSelectionException
    {
        final CoreTopology coreTopology = topologyService.localCoreServers();

        if ( coreTopology.members().size() == 0 )
        {
            throw new UpstreamDatabaseSelectionException( "No core servers available" );
        }

        int skippedServers = random.nextInt( coreTopology.members().size() );

        return coreTopology.members().keySet().stream().skip( skippedServers ).findFirst();
    }

    public  ConnectToRandomCoreServerStrategy();

}