func NewTestPeer(rng *rand.Rand, idx int) Peer {
	return New(
		id.NewPseudoRandom(rng),
		fmt.Sprintf("test-peer-%d", idx+1),
		NewTestPublicAddr(idx),
	)
}
NewTestPeer generates a new peer suitable for testing using a random number generator for the
ID and an index.
package peer
import (
	"fmt"
	"math/rand"
	"net"
	"testing"
	"time"
	cerrors "github.com/drausin/libri/libri/common/errors"
	"github.com/drausin/libri/libri/common/id"
	"github.com/drausin/libri/libri/librarian/server/storage"
	"github.com/stretchr/testify/assert"
)