func TestDispatcherDispatchOK(t *testing.T) {
	c := make(chan struct{})
	d := PatternMatching{
		"/bar": Method(func(msg Message) error {
			close(c)
			return nil
		}),
	}
	later := time.Now().Add(20 * time.Millisecond)
	b := Bundle{
		Timetag: FromTime(later),
		Packets: []Packet{
			Message{Address: "/bar"},
		},
	}
	if err := d.Dispatch(b, false); err != nil {
		t.Fatal(err)
	}
	<-c
}
Test a successful method invocation.
package osc
import (
	"testing"
	"time"
	"github.com/pkg/errors"
)