GoogleAuthProvider extends AuthProvider { String getConnection() { return connectionName; } GoogleAuthProvider(@NonNull String serverClientId, @NonNull AuthenticationAPIClient client);  GoogleAuthProvider(@NonNull String connectionName, @NonNull String serverClientId, @NonNull AuthenticationAPIClient client); void setRequiredPermissions(@NonNull String[] androidPermissions); void rememberLastLogin(boolean rememberLastLogin); void setScopes(@NonNull Scope... scope); @Override boolean authorize(int requestCode, int resultCode, @Nullable Intent intent); @Override boolean authorize(@Nullable Intent intent); @Override String[] getRequiredAndroidPermissions(); @Override void stop(); @Override void clearSession();  }
@Test public void shouldHaveNonNullConnectionName() throws Exception { MatcherAssert.assertThat(provider.getConnection(), is(notNullValue())); }
@Test public void shouldHaveDefaultConnectionName() throws Exception { MatcherAssert.assertThat(provider.getConnection(), is(CONNECTION_NAME)); }
@Test public void shouldCreateWithCustomConnectionName() throws Exception { provider = new GoogleAuthProviderMock("custom-connection", SERVER_CLIENT_ID, client, google); MatcherAssert.assertThat(provider.getConnection(), is(notNullValue())); MatcherAssert.assertThat(provider.getConnection(), is("custom-connection")); }