func (m *testMessageCapturer) handlerFunc(_ context.Context, msg string) error {
	m.msg = msg
	return nil
}
handlerFunc is the MessageHandlerFunc for the testMessageCapturer
package middleware
import (
	"errors"
	"testing"
	"time"
	"github.com/Wattpad/sqsconsumer"
	"github.com/stretchr/testify/assert"
	"golang.org/x/net/context"
)
func TestApplyDecoratorsToHandler(t *testing.T) {
	prefixer := func(prefix string) MessageHandlerDecorator {
		return func(next sqsconsumer.MessageHandlerFunc) sqsconsumer.MessageHandlerFunc {
			return func(ctx context.Context, msg string) error {
				return next(ctx, prefix+msg)
			}
		}
	}
	mc := &testMessageCapturer{}
	wrapped := ApplyDecoratorsToHandler(mc.handlerFunc, prefixer("a"), prefixer("b"), prefixer("c"))
	wrapped(context.Background(), "0")
	assert.Equal(t, "cba0", mc.msg)
}
type testMessageCapturer struct {
	msg string
}