FacebookAuthProvider extends AuthProvider { Collection<String> getPermissions() { return permissions; } FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0);   FacebookAuthProvider(String connectionName, AuthenticationAPIClient auth0, FacebookApi facebook);  FacebookAuthProvider(@NonNull AuthenticationAPIClient auth0); void setPermissions(@NonNull Collection<String> permissions); void rememberLastLogin(boolean rememberLastLogin); @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 shouldHaveNonNullPermissions() throws Exception { assertThat(provider.getPermissions(), is(notNullValue())); }
@Test public void shouldHaveDefaultPermissions() throws Exception { assertThat(provider.getPermissions(), is(hasSize(1))); assertThat(provider.getPermissions(), hasItem("public_profile")); }
@Test public void shouldRequestLoginWhenStarted() throws Exception { provider.start(activity, callback, PERMISSION_REQ_CODE, AUTH_REQ_CODE); verify(apiHelper).login(eq(activity), eq(AUTH_REQ_CODE), eq(provider.getPermissions()), any(FacebookApi.Callback.class)); }