@Test @SmallTest public void bind_startsService() { ShadowContextWrapper shadowContextWrapper = Shadow.extract(mContext); mBufferedServiceConnection.bindService(); Intent nextIntent = shadowContextWrapper.peekNextStartedService(); assertThat(mBindIntent).isEqualTo(nextIntent); }
void bindService() { if (mHasBound) { throw new IllegalStateException( "Each BufferedServiceConnection can only be bound once."); } mHasBound = true; mContext.bindService(mBindIntent, mConnection, mFlags); }
BufferedServiceConnection { void bindService() { if (mHasBound) { throw new IllegalStateException( "Each BufferedServiceConnection can only be bound once."); } mHasBound = true; mContext.bindService(mBindIntent, mConnection, mFlags); } }
BufferedServiceConnection { void bindService() { if (mHasBound) { throw new IllegalStateException( "Each BufferedServiceConnection can only be bound once."); } mHasBound = true; mContext.bindService(mBindIntent, mConnection, mFlags); } BufferedServiceConnection(
            Executor executor, Context context, Intent bindIntent, int flags); }
BufferedServiceConnection { void bindService() { if (mHasBound) { throw new IllegalStateException( "Each BufferedServiceConnection can only be bound once."); } mHasBound = true; mContext.bindService(mBindIntent, mConnection, mFlags); } BufferedServiceConnection(
            Executor executor, Context context, Intent bindIntent, int flags);  }
BufferedServiceConnection { void bindService() { if (mHasBound) { throw new IllegalStateException( "Each BufferedServiceConnection can only be bound once."); } mHasBound = true; mContext.bindService(mBindIntent, mConnection, mFlags); } BufferedServiceConnection(
            Executor executor, Context context, Intent bindIntent, int flags);   }