SmartLock extends Lock implements CredentialStore, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { public void onStart() { getCredentialClient().connect(); } SmartLock(Context context, APIClient apiClient);   SmartLock(GoogleApiClient credentialClient, APIClient client); void onStart(); void onStop(); @Override void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data); @Override void saveFromActivity(Activity activity, String username, String email, String password, String pictureUrl, CredentialStoreCallback callback); @Override void loginFromActivity(Activity activity); void disableAutoSignIn(); @Override void onConnected(Bundle bundle); @Override void onConnectionSuspended(int i); @Override void onConnectionFailed(ConnectionResult connectionResult); @Override CredentialStore getCredentialStore(); static SmartLock getSmartLock(Activity activity); static final int SMART_LOCK_READ; static final int SMART_LOCK_SAVE; }
@Test public void shouldTryToConnectOnStart() throws Exception { smartLock.onStart(); verify(googleApiClient).connect(); }