@@ -111,7 +111,7 @@ public void testTokenRefresh() throws BackgroundException, InterruptedException
111111 final TemporaryAccessTokens tokens = credentials .getTokens ();
112112 assertTrue (tokens .validate ());
113113
114- credentials .reset ( );
114+ credentials .setOauth ( OAuthTokens . EMPTY ). setTokens ( TemporaryAccessTokens . EMPTY );
115115
116116 Path container = new Path ("cyberduckbucket" , EnumSet .of (Path .Type .directory , Path .Type .volume ));
117117 assertTrue (new S3FindFeature (session , new S3AccessControlListFeature (session )).find (container ));
@@ -149,9 +149,7 @@ public void testLoginInvalidOAuthTokensLogin() throws Exception {
149149 session .login (new DisabledLoginCallback (), new DisabledCancelCallback ());
150150 assertNotEquals (OAuthTokens .EMPTY , credentials .getOauth ());
151151 assertNotEquals (TemporaryAccessTokens .EMPTY , credentials .getTokens ());
152- credentials .reset ();
153- assertEquals (OAuthTokens .EMPTY , credentials .getOauth ());
154- assertEquals (TemporaryAccessTokens .EMPTY , credentials .getTokens ());
152+ credentials .setOauth (OAuthTokens .EMPTY ).setTokens (TemporaryAccessTokens .EMPTY );
155153 new S3BucketListService (session ).list (
156154 new Path (String .valueOf (Path .DELIMITER ), EnumSet .of (Path .Type .volume , Path .Type .directory )), new DisabledListProgressListener ());
157155 }
@@ -181,9 +179,7 @@ public void testBucketListInvalidOAuthTokensList() throws Exception {
181179 new Path (String .valueOf (Path .DELIMITER ), EnumSet .of (Path .Type .volume , Path .Type .directory )), new DisabledListProgressListener ());
182180 assertNotEquals (OAuthTokens .EMPTY , credentials .getOauth ());
183181 assertNotEquals (TemporaryAccessTokens .EMPTY , credentials .getTokens ());
184- credentials .reset ();
185- assertEquals (OAuthTokens .EMPTY , credentials .getOauth ());
186- assertEquals (TemporaryAccessTokens .EMPTY , credentials .getTokens ());
182+ credentials .setOauth (OAuthTokens .EMPTY ).setTokens (TemporaryAccessTokens .EMPTY );
187183 new S3BucketListService (session ).list (
188184 new Path (String .valueOf (Path .DELIMITER ), EnumSet .of (Path .Type .volume , Path .Type .directory )), new DisabledListProgressListener ());
189185 }
0 commit comments