func NewTestSinglePageEntry(rng *rand.Rand) *Entry {
	page := NewTestPage(rng)
	return &Entry{
		AuthorPublicKey:       page.AuthorPublicKey,
		CreatedTime:           1,
		MetadataCiphertext:    RandBytes(rng, 64),
		MetadataCiphertextMac: RandBytes(rng, HMAC256Length),
		Page: page,
	}
}
NewTestSinglePageEntry generates a dummy Entry document with a single Page for use in testing.
package api
import (
	"math/rand"
	"github.com/drausin/libri/libri/common/ecid"
	"github.com/drausin/libri/libri/common/errors"
	"github.com/drausin/libri/libri/common/id"
)
func NewTestDocument(rng *rand.Rand) (*Document, id.ID) {
	doc := &Document{&Document_Entry{NewTestSinglePageEntry(rng)}}
	key, err := GetKey(doc)
	errors.MaybePanic(err)
	return doc, key
}
func NewTestEnvelope(rng *rand.Rand) *Envelope {
	return &Envelope{
		AuthorPublicKey:  fakePubKey(rng),
		ReaderPublicKey:  fakePubKey(rng),
		EntryKey:         RandBytes(rng, DocumentKeyLength),
		EekCiphertext:    RandBytes(rng, EEKCiphertextLength),
		EekCiphertextMac: RandBytes(rng, HMAC256Length),
	}
}