BasicOAuthStoreConsumerKeyAndSecret cks = new BasicOAuthStoreConsumerKeyAndSecret(
"somekey", "default", KeyType.RSA_PRIVATE, "keyname", null);
store.setDefaultKey(cks);
ConsumerInfo consumer = store.getConsumerKeyAndSecret(t, "", provider);
assertEquals("somekey", consumer.getConsumer().consumerKey);
assertNull(consumer.getConsumer().consumerSecret);
assertEquals("RSA-SHA1", consumer.getConsumer().getProperty("oauth_signature_method"));
assertEquals("default", consumer.getConsumer().getProperty(RSA_SHA1.PRIVATE_KEY));
assertEquals(provider, consumer.getConsumer().serviceProvider);
assertEquals("keyname", consumer.getKeyName());
assertEquals("default callback", consumer.getCallbackUrl());
cks = new BasicOAuthStoreConsumerKeyAndSecret(
"somekey", "default", KeyType.RSA_PRIVATE, "keyname", "callback");
store.setDefaultKey(cks);
consumer = store.getConsumerKeyAndSecret(t, "", provider);
assertEquals("callback", consumer.getCallbackUrl());
}