func (c *controllerImpl) getExpectationsLocked(
	o MockObject,
	methodName string) []*InternalExpectation {
	id := o.Oglemock_Id()
	expectationsByMethod, ok := c.expectationsByObject[id]
	if !ok {
		expectationsByMethod = methodMap{}
		c.expectationsByObject[id] = expectationsByMethod
	}
	result, ok := expectationsByMethod[methodName]
	if !ok {
		return []*InternalExpectation{}
	}
	return result
}
Return the list of registered expectations for the named method of the
supplied object, or an empty slice if none have been registered. When this
method returns, it is guaranteed that c.expectationsByObject has an entry
for the object.

c.mutex must be held for reading.
package oglemock
import (
	"errors"
	"fmt"
	"log"
	"math"
	"reflect"
	"sync"
)
type PartialExpecation func(...interface{}) Expectation
type Controller interface {
	ExpectCall(
		o MockObject,
		methodName string,
		fileName string,
		lineNumber int) PartialExpecation
	Finish()
	HandleMethodCall(
		o MockObject,
		methodName string,
		fileName string,
		lineNumber int,
		args []interface{}) []interface{}
}
type methodMap map[string][]*InternalExpectation
type objectMap map[uintptr]methodMap
func NewController(reporter ErrorReporter) Controller {
	return &controllerImpl{reporter, sync.RWMutex{}, objectMap{}}
}
type controllerImpl struct {
	reporter ErrorReporter
	mutex                sync.RWMutex
	expectationsByObject objectMap  
}