func (conn *DBusFakeConnection) AddObject(name, path string, handler DBusFakeHandler) {
	conn.objects[name+path] = &fakeObject{handler}
}
AddObject adds a handler for the Object at name and path
package dbus
import (
	"fmt"
	"sync"
	godbus "github.com/godbus/dbus"
)
type DBusFake struct {
	systemBus  *DBusFakeConnection
	sessionBus *DBusFakeConnection
}
type DBusFakeConnection struct {
	lock           sync.Mutex
	busObject      *fakeObject
	objects        map[string]*fakeObject
	signalHandlers []chan<- *godbus.Signal
}
type DBusFakeHandler func(method string, args ...interface{}) ([]interface{}, error)
type fakeObject struct {
	handler DBusFakeHandler
}
type fakeCall struct {
	ret []interface{}
	err error
}
func NewFake(systemBus *DBusFakeConnection, sessionBus *DBusFakeConnection) *DBusFake {
	return &DBusFake{systemBus, sessionBus}
}
func NewFakeConnection() *DBusFakeConnection {
	return &DBusFakeConnection{
		objects: make(map[string]*fakeObject),
	}
}
func (db *DBusFake) SystemBus() (Connection, error) {
	if db.systemBus != nil {
		return db.systemBus, nil
	} else {
		return nil, fmt.Errorf("DBus is not running")
	}
}
func (db *DBusFake) SessionBus() (Connection, error) {
	if db.sessionBus != nil {
		return db.sessionBus, nil
	} else {
		return nil, fmt.Errorf("DBus is not running")
	}
}
func (conn *DBusFakeConnection) BusObject() Object {
	return conn.busObject
}
func (conn *DBusFakeConnection) Object(name, path string) Object {
	return conn.objects[name+path]
}
func (conn *DBusFakeConnection) Signal(ch chan<- *godbus.Signal) {
	conn.lock.Lock()
	defer conn.lock.Unlock()
	for i := range conn.signalHandlers {
		if conn.signalHandlers[i] == ch {
			conn.signalHandlers = append(conn.signalHandlers[:i], conn.signalHandlers[i+1:]...)
			return
		}
	}
	conn.signalHandlers = append(conn.signalHandlers, ch)
}
func (conn *DBusFakeConnection) SetBusObject(handler DBusFakeHandler) {
	conn.busObject = &fakeObject{handler}
}