1212import com .liferay .oauth2 .provider .scope .spi .scope .finder .ScopeFinder ;
1313import com .liferay .oauth2 .provider .service .OAuth2ApplicationLocalService ;
1414import com .liferay .oauth2 .provider .service .OAuth2ScopeGrantLocalService ;
15- import com .liferay .portal .kernel .exception .PortalException ;
1615import com .liferay .portal .kernel .model .User ;
1716import com .liferay .portal .kernel .test .rule .AggregateTestRule ;
1817import com .liferay .portal .kernel .test .util .UserTestUtil ;
2120import com .liferay .portal .test .rule .Inject ;
2221import com .liferay .portal .test .rule .LiferayIntegrationTestRule ;
2322
24- import java .util .ArrayList ;
2523import java .util .Collections ;
2624import java .util .Dictionary ;
27- import java .util .List ;
2825
2926import javax .ws .rs .client .Invocation ;
3027import javax .ws .rs .client .WebTarget ;
@@ -49,7 +46,7 @@ public class ScopeFinderTest extends BaseClientTestCase {
4946 new LiferayIntegrationTestRule ();
5047
5148 @ Test
52- public void testUnavailableAssignedScopeAliases () throws PortalException {
49+ public void testUnavailableAssignedScopeAliases () throws Exception {
5350 String token = getToken (
5451 "oauthTestClientCredentials" , null ,
5552 this ::getClientCredentialsResponse , this ::parseTokenString );
@@ -103,17 +100,14 @@ public void testUnavailableAssignedScopeAliases() throws PortalException {
103100 invocationBuilder .get (
104101 ).getStatus ());
105102
106- List <String > scopeAliasess = new ArrayList <>();
107-
108- scopeAliasess .add ("Liferay.Captcha.REST.everything.write" );
109-
110103 OAuth2Application oAuth2Application =
111104 _oAuth2ApplicationLocalService .getOAuth2Application (
112105 _oAuth2ApplicationId );
113106
114107 _oAuth2ApplicationLocalService .updateScopeAliases (
115108 oAuth2Application .getUserId (), oAuth2Application .getUserName (),
116- _oAuth2ApplicationId , scopeAliasess );
109+ _oAuth2ApplicationId ,
110+ Collections .singletonList ("Liferay.Captcha.REST.everything.write" ));
117111
118112 invocationBuilder = authorize (
119113 webTarget .request (),
0 commit comments