func watchNetwork(t *testing.T, watch chan events.Event, expectTimeout bool, fn func(t assert.TestingT, n *api.Network) bool) {
    for {
        var network *api.Network
        select {
        case event := <-watch: