@Test public void shouldRead() throws CoreTokenException { Token token = mock(Token.class); given(tokenIdFactory.getOAuthTokenId("ID")).willReturn("ID2"); given(cts.read("ID2")).willReturn(token); JsonValue oAuthToken = oAuthTokenStore.read("ID"); verify(tokenAdapter).fromToken(token); }
public JsonValue read(String id) throws CoreTokenException { Token token = cts.read(tokenIdFactory.getOAuthTokenId(id)); if (token == null) { return null; } return tokenAdapter.fromToken(token); }
OAuthTokenStore { public JsonValue read(String id) throws CoreTokenException { Token token = cts.read(tokenIdFactory.getOAuthTokenId(id)); if (token == null) { return null; } return tokenAdapter.fromToken(token); } }
OAuthTokenStore { public JsonValue read(String id) throws CoreTokenException { Token token = cts.read(tokenIdFactory.getOAuthTokenId(id)); if (token == null) { return null; } return tokenAdapter.fromToken(token); } @Inject  OAuthTokenStore(CTSPersistentStore cts, TokenAdapter<JsonValue> tokenAdapter,
            TokenIdFactory tokenIdFactory); }
OAuthTokenStore { public JsonValue read(String id) throws CoreTokenException { Token token = cts.read(tokenIdFactory.getOAuthTokenId(id)); if (token == null) { return null; } return tokenAdapter.fromToken(token); } @Inject  OAuthTokenStore(CTSPersistentStore cts, TokenAdapter<JsonValue> tokenAdapter,
            TokenIdFactory tokenIdFactory); void create(JsonValue token); JsonValue read(String id); void update(JsonValue token); void delete(String id); JsonValue query(Map<String, Object> queryParameters); JsonValue query(Map<String, Object> queryParameters, boolean and); }
OAuthTokenStore { public JsonValue read(String id) throws CoreTokenException { Token token = cts.read(tokenIdFactory.getOAuthTokenId(id)); if (token == null) { return null; } return tokenAdapter.fromToken(token); } @Inject  OAuthTokenStore(CTSPersistentStore cts, TokenAdapter<JsonValue> tokenAdapter,
            TokenIdFactory tokenIdFactory); void create(JsonValue token); JsonValue read(String id); void update(JsonValue token); void delete(String id); JsonValue query(Map<String, Object> queryParameters); JsonValue query(Map<String, Object> queryParameters, boolean and);  }