// ToBeNil asserts that the assertion value is nil.
182972
func (as *Assertion) ToBeNil() {
	if !as.isNil(as.Value) {
		as.Test.PrintError(fmt.Sprintf("Expected `%v` to not exist", as.Value))
	}
}
612756
func (rw LeveledRWMutex) AssertRLocked(lockState *LockState) {
	et := lockState.getExclusionType(rw.level)
	if et != readExclusion {
		panic(unexpectedExclusionTypeError{
			levelToString:         lockState.levelToString,
			level:                 rw.level,
			expectedExclusionType: readExclusion,
			exclusionType:         et,
		})
	}
}
1038147
func (s *GetSAMLProviderOutput) SetValidUntil(v time.Time) *GetSAMLProviderOutput {
	s.ValidUntil = &v
	return s
}
1355572
func (m *MockACLProvider) AssertExpectations(t *testing.T) {
	m.mock.AssertExpectations(t)
}
913303
func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool {
	return Fail(a.t, failureMessage, msgAndArgs...)
}
777447
func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if !isNil(object) {
		return true
	}
	return Fail(t, "Expected value not to be nil.", msgAndArgs...)
}
46381
func AssertLe(x, y interface{}, errorParts ...interface{}) {
	assertThat(x, oglematchers.LessOrEqual(y), 1, errorParts)
}
83541
func WaitUntil(fn ConditionFn, timeout time.Duration) bool {
	deadline := time.Now().Add(timeout)
	for time.Now().Before(deadline) {
		if fn() {
			return true
		}
		time.Sleep(100 * time.Millisecond)
	}
	return false
}
1161106
func toBool(v reflect.Value) bool {
	b, _ := tryToBool(v)
	return b
}
1283502
func (s *SAMLProviderListEntry) SetValidUntil(v time.Time) *SAMLProviderListEntry {
	s.ValidUntil = &v
	return s
}
1103254
func toInt(v reflect.Value) int {
	i, _ := tryToInt(v)
	return i
}
1324591
func assert(t testing.TB, expr bool, msg1 []interface{}, msg2 []interface{}) {
	if !expr {
		t.Error(formatMessage(msg1, msg2) + "@" + getCallerInfo())
	}
}
472685
func (as *Assertion) ToBeEmpty() {
	if !as.isEmpty(as.Value) {
		as.Test.PrintError(fmt.Sprintf("Expected `%v` to be empty", as.Value))
	}
}
675645
func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	return Failf(a.t, failureMessage, msg, args...)
}
620606
func (fc *fakeClock) BlockUntil(n int) {
	fc.l.Lock()
	// Fast path: current number of sleepers is what we're looking for
	if len(fc.sleepers) == n {
		fc.l.Unlock()
		return
	}
	// Otherwise, set up a new blocker
	b := &blocker{
		count: n,
		ch:    make(chan struct{}),
	}
	fc.blockers = append(fc.blockers, b)
	fc.l.Unlock()
	<-b.ch
}
670209
func (expectation *Expectation) To(matcher Matcher, expected ...interface{}) {
	if !expectation.Example.HasFailure {
		values := append([]interface{}{expectation.Actual}, expected...)
		if failureMessage := matcher(values...); failureMessage != "" {
			expectation.Example.Failed(failureMessage)
		}
	}
}
721325
func (a *AccessToken) ToJWT() (string, error) {
	claims := &twilioClaims{
		jwt.StandardClaims{
			Id:        a.APIKeySid + fmt.Sprintf("-%d", time.Now().UnixNano()),
			Issuer:    a.APIKeySid,
			Subject:   a.AccountSid,
			NotBefore: a.NotBefore.Unix(),
			ExpiresAt: a.ExpiresAt.Unix(),
		},
		&grantsClaim{
			Identity: a.Identity,
			Grants:   a.Grants,
		},
	}

	token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
	token.Header = map[string]interface{}{
		"typ": "JWT",
		"alg": "HS256",
		"cty": "twilio-fpa;v=1",
	}

	ss, err := token.SignedString([]byte(a.APIKeySecret))

	return ss, err
}