### Question:
JpaOAuthTokenInfoRepository implements OAuthTokenInfoRepository { @Override public OAuthTokenInfo findOAuthTokenInfo(String userId, String appUrl, String moduleId, String tokenName, String serviceName) { TypedQuery<JpaOAuthTokenInfo> query = manager.createNamedQuery(JpaOAuthTokenInfo.FIND_OAUTH_TOKEN_INFO, JpaOAuthTokenInfo.class); query.setParameter(JpaOAuthTokenInfo.USER_ID_PARAM, userId); query.setParameter(JpaOAuthTokenInfo.APP_URL_PARAM, appUrl); query.setParameter(JpaOAuthTokenInfo.MODULE_ID_PARAM, moduleId); query.setParameter(JpaOAuthTokenInfo.TOKEN_NAME_PARAM, tokenName); query.setParameter(JpaOAuthTokenInfo.SERVICE_NAME_PARAM, serviceName); return getSingleResult(query.getResultList()); }  @Override Class<? extends OAuthTokenInfo> getType(); @Override OAuthTokenInfo get(String id); @Override OAuthTokenInfo save(OAuthTokenInfo item); @Override void delete(OAuthTokenInfo item); @Override List<OAuthTokenInfo> getAll(); @Override List<OAuthTokenInfo> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override OAuthTokenInfo findOAuthTokenInfo(String userId, String appUrl, String moduleId,
                                             String tokenName, String serviceName);  }### Answer:
@Test public void testFindOAuthTokenInfo() throws Exception { OAuthTokenInfo tokenInfo = repository.findOAuthTokenInfo(VALID_USER, APP_URL, JpaOAuthTokenInfo.MODULE_ID, TOKEN_NAME, SERVICE_NAME); assertNotNull(tokenInfo); assertEquals("accessToken", tokenInfo.getAccessToken()); }
@Test public void testFindOAuthTokenInfo_nullValue() throws Exception { OAuthTokenInfo tokenInfo = repository.findOAuthTokenInfo(INVALID_USER, APP_URL, JpaOAuthTokenInfo.MODULE_ID, TOKEN_NAME, SERVICE_NAME); assertNull(tokenInfo); }