### Question:
FusedLocationProviderApiImpl extends ApiImpl implements FusedLocationProviderApi, EventCallbacks, ServiceConnection { @Override public void onConnect(Context context) { this.context = context; final Intent intent = new Intent(context, FusedLocationProviderService.class); context.bindService(intent, this, Context.BIND_AUTO_CREATE); } FusedLocationProviderApiImpl(FusedLocationServiceConnectionManager connectionManager,
      FusedLocationServiceCallbackManager callbackManager, RequestManager requestManager,
      ClientManager clientManager); @Override void onConnect(Context context); @Override void onServiceConnected(IBinder binder); @Override void onDisconnect(); @Override void onServiceConnected(ComponentName name, IBinder binder); @Override void onServiceDisconnected(ComponentName name); boolean isConnecting(); void addConnectionCallbacks(LostApiClient.ConnectionCallbacks callbacks); void connect(Context context, LostApiClient.ConnectionCallbacks callbacks); void disconnect(); boolean isConnected(); @Override Location getLastLocation(LostApiClient client); @Override LocationAvailability getLocationAvailability(LostApiClient client); @Override PendingResult<Status> requestLocationUpdates(LostApiClient client,
      LocationRequest request, LocationListener listener); @Override PendingResult<Status> requestLocationUpdates(LostApiClient client,
      LocationRequest request, LocationListener listener, Looper looper); @Override PendingResult<Status> requestLocationUpdates(LostApiClient client,
      LocationRequest request, LocationCallback callback, Looper looper); @Override PendingResult<Status> requestLocationUpdates(LostApiClient client,
      LocationRequest request, PendingIntent callbackIntent); @Override PendingResult<Status> removeLocationUpdates(LostApiClient client,
      LocationListener listener); @Override PendingResult<Status> removeLocationUpdates(LostApiClient client,
      PendingIntent callbackIntent); @Override PendingResult<Status> removeLocationUpdates(LostApiClient client,
      LocationCallback callback); @Override PendingResult<Status> setMockMode(LostApiClient client, boolean isMockMode); @Override PendingResult<Status> setMockLocation(LostApiClient client,
      Location mockLocation); @Override PendingResult<Status> setMockTrace(LostApiClient client, String path,
      String filename); Map<LostApiClient, Set<LocationListener>> getLocationListeners();  }### Answer:
@Test public void onConnect_shouldStartService() throws Exception { Context context = mock(Context.class); api.onConnect(context); verify(context).startService(new Intent(context, FusedLocationProviderService.class)); }
@Test public void onConnect_shouldBindService() throws Exception { Context context = mock(Context.class); api.onConnect(context); verify(context).bindService(new Intent(context, FusedLocationProviderService.class), api, Context.BIND_AUTO_CREATE); }