PLCOAuthProvider implements OAuthProvider { @Override public OAuthConsumer getConsumer(String consumerKey) { return consumerDao.getByKey(consumerKey); } @Inject  PLCOAuthProvider(TokenDao tokenDao, ConsumerDao consumerDao); @Override OAuthConsumer getConsumer(String consumerKey); @Override OAuthToken newRequestToken(String consumerKey, String callbackUrl, Map<String, List<String>> attributes); @Override OAuthToken getRequestToken(String token); @Override OAuthToken newAccessToken(com.sun.jersey.oauth.server.spi.OAuthToken requestToken, String verifier); @Override OAuthToken getAccessToken(String token);  }
@Test public void getConsumer() { OAuthConsumer c = provider.getConsumer(consumer.getKey()); assertEquals(consumer.getKey(), c.getKey()); assertEquals(consumer.getSecret(), c.getSecret()); }