func newResponseBody(data []byte) io.ReadCloser {
	return &reponseBody{
		reader: bytes.NewReader(data),
	}
}
newResponseBody creates a new response body.
package mocks
import (
	"bytes"
	"errors"
	"io"
	"net/http"
	"time"
	"github.com/gorilla/websocket"
)
var ErrReadFailed = errors.New("Read() failed")
type Conn struct {
	CloseResult error
	MessageByteArray []byte
	NextReaderMessageType int
	NextReaderResult error
	NextReaderMustFail bool
	ReadMessageResult error
	ReadMessageType int
	SetReadDeadlineResult error
	SetWriteDeadlineResult error
	WritePreparedMessageResult error
}
func (c *Conn) Close() error {
	return c.CloseResult
}
func (c *Conn) ReadMessage() (messageType int, p []byte, err error) {
	return c.ReadMessageType, c.MessageByteArray, c.ReadMessageResult
}
func (c *Conn) NextReader() (messageType int, r io.Reader, err error) {
	if c.NextReaderMustFail {
		return c.NextReaderMessageType, &FailingReader{}, c.NextReaderResult
	}
	return c.NextReaderMessageType, bytes.NewReader(c.MessageByteArray),
		c.NextReaderResult
}
func (*Conn) SetReadLimit(limit int64) {}
func (c *Conn) SetReadDeadline(t time.Time) error {
	return c.SetReadDeadlineResult
}
func (c *Conn) SetWriteDeadline(t time.Time) error {
	return c.SetWriteDeadlineResult
}
func (c *Conn) WritePreparedMessage(pm *websocket.PreparedMessage) error {
	return c.WritePreparedMessageResult
}
type reponseBody struct {
	reader io.Reader
}