test_class.declarator: CONSUMER_KEY = "consumer_key"
test_class.modifier: private static final
test_class.original_string: private static final String CONSUMER_KEY = "consumer_key";
test_class.type: String
test_class.var_name: CONSUMER_KEY
test_class.declarator: CONSUMER_SECRET = "consumer_secret"
test_class.modifier: private static final
test_class.original_string: private static final String CONSUMER_SECRET = "consumer_secret";
test_class.type: String
test_class.var_name: CONSUMER_SECRET
test_class.declarator: ACCESS_TOKEN = "access_token"
test_class.modifier: private static final
test_class.original_string: private static final String ACCESS_TOKEN = "access_token";
test_class.type: String
test_class.var_name: ACCESS_TOKEN
test_class.declarator: ACCESS_SECRET = "access_secret"
test_class.modifier: private static final
test_class.original_string: private static final String ACCESS_SECRET = "access_secret";
test_class.type: String
test_class.var_name: ACCESS_SECRET
test_class.declarator: server
test_class.modifier: private static
test_class.original_string: private static MockWebServer server;
test_class.type: MockWebServer
test_class.var_name: server
test_class.declarator: connection
test_class.modifier: private
test_class.original_string: private OAuthApiConnection connection;
test_class.type: OAuthApiConnection
test_class.var_name: connection
test_class.declarator: mapper = new ObjectMapper()
test_class.modifier: private final
test_class.original_string: private final ObjectMapper mapper = new ObjectMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: NOT_LOGGED_IN_SERIALIZED = "{\"baseUrl\":\"" + server.url("/w/api.php") + "\"," +
              "\"consumerKey\":null," +
              "\"consumerSecret\":null," +
              "\"accessToken\":null," +
              "\"accessSecret\":null," +
              "\"username\":\"\"," +
              "\"loggedIn\":false," +
              "\"tokens\":{}," +
              "\"connectTimeout\":-1," +
              "\"readTimeout\":-1}"
test_class.modifier: private final
test_class.original_string: private final String NOT_LOGGED_IN_SERIALIZED = "{\"baseUrl\":\"" + server.url("/w/api.php") + "\"," +
              "\"consumerKey\":null," +
              "\"consumerSecret\":null," +
              "\"accessToken\":null," +
              "\"accessSecret\":null," +
              "\"username\":\"\"," +
              "\"loggedIn\":false," +
              "\"tokens\":{}," +
              "\"connectTimeout\":-1," +
              "\"readTimeout\":-1}";
test_class.type: String
test_class.var_name: NOT_LOGGED_IN_SERIALIZED
test_class.declarator: LOGGED_IN_SERIALIZED = "{\"baseUrl\":\"" + server.url("/w/api.php") + "\"," +
              "\"consumerKey\":\"consumer_key\"," +
              "\"consumerSecret\":\"consumer_secret\"," +
              "\"accessToken\":\"access_token\"," +
              "\"accessSecret\":\"access_secret\"," +
              "\"username\":\"foo\"," +
              "\"loggedIn\":true," +
              "\"tokens\":{}," +
              "\"connectTimeout\":-1," +
              "\"readTimeout\":-1}"
test_class.modifier: private final
test_class.original_string: private final String LOGGED_IN_SERIALIZED = "{\"baseUrl\":\"" + server.url("/w/api.php") + "\"," +
              "\"consumerKey\":\"consumer_key\"," +
              "\"consumerSecret\":\"consumer_secret\"," +
              "\"accessToken\":\"access_token\"," +
              "\"accessSecret\":\"access_secret\"," +
              "\"username\":\"foo\"," +
              "\"loggedIn\":true," +
              "\"tokens\":{}," +
              "\"connectTimeout\":-1," +
              "\"readTimeout\":-1}";
test_class.type: String
test_class.var_name: LOGGED_IN_SERIALIZED
test_class.file: wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnectionTest.java
test_class.identifier: OAuthApiConnectionTest
test_case.body: @Test
      public void testLogout() throws IOException, InterruptedException {
          assertTrue(connection.isLoggedIn());
          assertEquals("foo", connection.getCurrentUser());
  
          connection.logout();
          assertEquals("", connection.getCurrentUser());
          assertFalse(connection.isLoggedIn());
          assertEquals("", connection.getCurrentUser());
  
          RecordedRequest request = server.takeRequest();
          assertNotNull(request.getHeader("Authorization"));
      }
test_case.class_method_signature: OAuthApiConnectionTest.testLogout()
test_case.full_signature: @Test public void testLogout()
test_case.identifier: testLogout
test_case.invocations: assertTrue isLoggedIn assertEquals getCurrentUser logout assertEquals getCurrentUser assertFalse isLoggedIn assertEquals getCurrentUser takeRequest assertNotNull getHeader
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLogout()
focal_class.declarator: consumerKey
focal_class.modifier: private
focal_class.original_string: private String consumerKey;
focal_class.type: String
focal_class.var_name: consumerKey
focal_class.declarator: consumerSecret
focal_class.modifier: private
focal_class.original_string: private String consumerSecret;
focal_class.type: String
focal_class.var_name: consumerSecret
focal_class.declarator: accessToken
focal_class.modifier: private
focal_class.original_string: private String accessToken;
focal_class.type: String
focal_class.var_name: accessToken
focal_class.declarator: accessSecret
focal_class.modifier: private
focal_class.original_string: private String accessSecret;
focal_class.type: String
focal_class.var_name: accessSecret
focal_class.file: wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnection.java
focal_class.identifier: OAuthApiConnection
focal_class.class_method_signature: OAuthApiConnection.OAuthApiConnection(String apiBaseUrl,
                                String consumerKey,
                                String consumerSecret,
                                String accessToken,
                                String accessSecret)
focal_class.full_signature: public  OAuthApiConnection(String apiBaseUrl,
                                String consumerKey,
                                String consumerSecret,
                                String accessToken,
                                String accessSecret)
focal_class.identifier: OAuthApiConnection
focal_class.modifiers: public
focal_class.parameters: (String apiBaseUrl,
                                String consumerKey,
                                String consumerSecret,
                                String accessToken,
                                String accessSecret)
focal_class.signature:  OAuthApiConnection(String apiBaseUrl,
                                String consumerKey,
                                String consumerSecret,
                                String accessToken,
                                String accessSecret)
focal_class.class_method_signature: OAuthApiConnection.OAuthApiConnection(
              @JsonProperty("baseUrl") String apiBaseUrl,
              @JsonProperty("consumerKey") String consumerKey,
              @JsonProperty("consumerSecret") String consumerSecret,
              @JsonProperty("accessToken") String accessToken,
              @JsonProperty("accessSecret") String accessSecret,
              @JsonProperty("username") String username,
              @JsonProperty("loggedIn") boolean loggedIn,
              @JsonProperty("tokens") Map<String, String> tokens,
              @JsonProperty("connectTimeout") int connectTimeout,
              @JsonProperty("readTimeout") int readTimeout)
focal_class.full_signature: @JsonCreator protected  OAuthApiConnection(
              @JsonProperty("baseUrl") String apiBaseUrl,
              @JsonProperty("consumerKey") String consumerKey,
              @JsonProperty("consumerSecret") String consumerSecret,
              @JsonProperty("accessToken") String accessToken,
              @JsonProperty("accessSecret") String accessSecret,
              @JsonProperty("username") String username,
              @JsonProperty("loggedIn") boolean loggedIn,
              @JsonProperty("tokens") Map<String, String> tokens,
              @JsonProperty("connectTimeout") int connectTimeout,
              @JsonProperty("readTimeout") int readTimeout)
focal_class.identifier: OAuthApiConnection
focal_class.modifiers: @JsonCreator protected
focal_class.parameters: (
              @JsonProperty("baseUrl") String apiBaseUrl,
              @JsonProperty("consumerKey") String consumerKey,
              @JsonProperty("consumerSecret") String consumerSecret,
              @JsonProperty("accessToken") String accessToken,
              @JsonProperty("accessSecret") String accessSecret,
              @JsonProperty("username") String username,
              @JsonProperty("loggedIn") boolean loggedIn,
              @JsonProperty("tokens") Map<String, String> tokens,
              @JsonProperty("connectTimeout") int connectTimeout,
              @JsonProperty("readTimeout") int readTimeout)
focal_class.signature:  OAuthApiConnection(
              @JsonProperty("baseUrl") String apiBaseUrl,
              @JsonProperty("consumerKey") String consumerKey,
              @JsonProperty("consumerSecret") String consumerSecret,
              @JsonProperty("accessToken") String accessToken,
              @JsonProperty("accessSecret") String accessSecret,
              @JsonProperty("username") String username,
              @JsonProperty("loggedIn") boolean loggedIn,
              @JsonProperty("tokens") Map<String, String> tokens,
              @JsonProperty("connectTimeout") int connectTimeout,
              @JsonProperty("readTimeout") int readTimeout)
focal_class.class_method_signature: OAuthApiConnection.getClientBuilder()
focal_class.full_signature: @Override protected OkHttpClient.Builder getClientBuilder()
focal_class.identifier: getClientBuilder
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: OkHttpClient.Builder
focal_class.signature: OkHttpClient.Builder getClientBuilder()
focal_class.class_method_signature: OAuthApiConnection.logout()
focal_class.full_signature: @Override public void logout()
focal_class.identifier: logout
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void logout()
focal_class.class_method_signature: OAuthApiConnection.checkCredentials()
focal_class.full_signature: @Override public void checkCredentials()
focal_class.identifier: checkCredentials
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkCredentials()
focal_class.class_method_signature: OAuthApiConnection.getCurrentUser()
focal_class.full_signature: @Override @JsonProperty("username") public String getCurrentUser()
focal_class.identifier: getCurrentUser
focal_class.modifiers: @Override @JsonProperty("username") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCurrentUser()
focal_class.class_method_signature: OAuthApiConnection.getConsumerKey()
focal_class.full_signature: @JsonProperty("consumerKey") public String getConsumerKey()
focal_class.identifier: getConsumerKey
focal_class.modifiers: @JsonProperty("consumerKey") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getConsumerKey()
focal_class.class_method_signature: OAuthApiConnection.getConsumerSecret()
focal_class.full_signature: @JsonProperty("consumerSecret") public String getConsumerSecret()
focal_class.identifier: getConsumerSecret
focal_class.modifiers: @JsonProperty("consumerSecret") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getConsumerSecret()
focal_class.class_method_signature: OAuthApiConnection.getAccessToken()
focal_class.full_signature: @JsonProperty("accessToken") public String getAccessToken()
focal_class.identifier: getAccessToken
focal_class.modifiers: @JsonProperty("accessToken") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getAccessToken()
focal_class.class_method_signature: OAuthApiConnection.getAccessSecret()
focal_class.full_signature: @JsonProperty("accessSecret") public String getAccessSecret()
focal_class.identifier: getAccessSecret
focal_class.modifiers: @JsonProperty("accessSecret") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getAccessSecret()
focal_class.superclass: extends ApiConnection
focal_method.body: @Override
      public void logout() {
          consumerKey = null;
          consumerSecret = null;
          accessToken = null;
          accessSecret = null;
          username = "";
          loggedIn = false;
      }
focal_method.class_method_signature: OAuthApiConnection.logout()
focal_method.full_signature: @Override public void logout()
focal_method.identifier: logout
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void logout()