@Test public void testGetTransportClient_withExtras_createsTransportClientWithCorrectIntent() { Bundle extras = new Bundle(); extras.putBoolean("random_extra", true); TransportClient transportClient = mTransportClientManager.getTransportClient(mTransportComponent, extras, "caller"); transportClient.connectAsync(mTransportConnectionListener, "caller"); mBindIntent.putExtras(extras); verify(mContext) .bindServiceAsUser( argThat(matchesIntentAndExtras(mBindIntent)), any(ServiceConnection.class), anyInt(), any(UserHandle.class)); }
public TransportClient getTransportClient(ComponentName transportComponent, String caller) { Intent bindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(transportComponent); return getTransportClient(transportComponent, caller, bindIntent); }
TransportClientManager { public TransportClient getTransportClient(ComponentName transportComponent, String caller) { Intent bindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(transportComponent); return getTransportClient(transportComponent, caller, bindIntent); } }
TransportClientManager { public TransportClient getTransportClient(ComponentName transportComponent, String caller) { Intent bindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(transportComponent); return getTransportClient(transportComponent, caller, bindIntent); } TransportClientManager(Context context, TransportStats transportStats); }
TransportClientManager { public TransportClient getTransportClient(ComponentName transportComponent, String caller) { Intent bindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(transportComponent); return getTransportClient(transportComponent, caller, bindIntent); } TransportClientManager(Context context, TransportStats transportStats); TransportClient getTransportClient(ComponentName transportComponent, String caller); TransportClient getTransportClient(
            ComponentName transportComponent, Bundle extras, String caller); void disposeOfTransportClient(TransportClient transportClient, String caller); void dump(PrintWriter pw); }
TransportClientManager { public TransportClient getTransportClient(ComponentName transportComponent, String caller) { Intent bindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(transportComponent); return getTransportClient(transportComponent, caller, bindIntent); } TransportClientManager(Context context, TransportStats transportStats); TransportClient getTransportClient(ComponentName transportComponent, String caller); TransportClient getTransportClient(
            ComponentName transportComponent, Bundle extras, String caller); void disposeOfTransportClient(TransportClient transportClient, String caller); void dump(PrintWriter pw);  }