func (s *SubscriberSuite) TestSimpleSubscribe(c *C) {
	cfg := newConfig("m1")
	ss := Spawn(s.ns.NewChild("m1"), "g1", cfg, s.zkConn)
	defer ss.Stop()
	ss.Topics() <- []string{"foo", "bar"}
	c.Assert(<-ss.Subscriptions(), DeepEquals,
		map[string][]string{"m1": {"bar", "foo"}})
}
When a list of topics is sent to the `topics()` channel, a membership change
is received with the same list of topics for the registrator name.
package subscriber
import (
	"reflect"
	"sync"
	"testing"
	"time"
	"github.com/mailgun/kafka-pixy/actor"
	"github.com/mailgun/kafka-pixy/config"
	"github.com/mailgun/kafka-pixy/none"
	"github.com/mailgun/kafka-pixy/testhelpers"
	"github.com/samuel/go-zookeeper/zk"
	. "gopkg.in/check.v1"
)
const (
	chroot = "/test"
)
func Test(t *testing.T) {
	TestingT(t)
}
type SubscriberSuite struct {
	ns     *actor.Descriptor
	zkConn *zk.Conn
}
var _ = Suite(&SubscriberSuite{})
func (s *SubscriberSuite) SetUpSuite(c *C) {
	testhelpers.InitLogging()
	var err error
	sessionTimeout := 300 * time.Second
	s.zkConn, _, err = zk.Connect(testhelpers.ZookeeperPeers, sessionTimeout)
	c.Assert(err, IsNil)
}
func (s *SubscriberSuite) SetUpTest(c *C) {
	s.ns = actor.Root().NewChild("T")
}