docs: @Override
      public synchronized void setOAuthConsumer(String consumerKey, String consumerSecret) {
          if (null == consumerKey) {
              throw new NullPointerException("consumer key is null");
          }
          if (null == consumerSecret) {
              throw new NullPointerException("consumer secret is null");
          }
          if (auth instanceof NullAuthorization) {
              if (conf.isApplicationOnlyAuthEnabled()) {
                  OAuth2Authorization oauth2 = new OAuth2Authorization(conf);
                  oauth2.setOAuthConsumer(consumerKey, consumerSecret);
                  auth = oauth2;
              } else {
                  OAuthAuthorization oauth = new OAuthAuthorization(conf);
                  oauth.setOAuthConsumer(consumerKey, consumerSecret);
                  auth = oauth;
              }
          } else if (auth instanceof BasicAuthorization) {
              XAuthAuthorization xauth = new XAuthAuthorization((BasicAuthorization) auth);
              xauth.setOAuthConsumer(consumerKey, consumerSecret);
              auth = xauth;
          } else if (auth instanceof OAuthAuthorization || auth instanceof OAuth2Authorization) {
              throw new IllegalStateException("consumer key/secret pair already set.");
          }
      }