### Question:
OAuth2TokenDAO extends AbstractSearcherDAO implements IOAuth2TokenDAO { @Override public List<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String username) { if (StringUtils.isBlank(clientId) && StringUtils.isBlank(username)) { throw new RuntimeException("clientId and username cannot both be null"); } FieldSearchFilter expirationFilter = new FieldSearchFilter("expiresin"); expirationFilter.setOrder(FieldSearchFilter.Order.ASC); FieldSearchFilter[] filters = {expirationFilter}; if (!StringUtils.isBlank(clientId)) { FieldSearchFilter clientIdFilter = new FieldSearchFilter("clientid", clientId, true); filters = ArrayUtils.add(filters, clientIdFilter); } if (!StringUtils.isBlank(username)) { FieldSearchFilter usernameFilter = new FieldSearchFilter("localuser", username, true); filters = ArrayUtils.add(filters, usernameFilter); } List<OAuth2AccessToken> accessTokens = new ArrayList<>(); List<String> tokens = super.searchId(filters); if (tokens.isEmpty()) { return accessTokens; } Connection conn = null; try { conn = this.getConnection(); for (String token : tokens) { OAuth2AccessToken accessToken = this.getAccessToken(token, conn); if (!accessToken.isExpired()) { accessTokens.add(accessToken); } } } catch (Exception t) { logger.error("Error while loading tokens", t); throw new RuntimeException("Error while loading tokens", t); } finally { this.closeConnection(conn); } return accessTokens; }  @Override List<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String username); @Override List<OAuth2AccessToken> findTokensByUserName(String username); @Override List<OAuth2AccessToken> findTokensByClientId(String clientId); @Override void storeAccessToken(OAuth2AccessToken accessToken, OAuth2Authentication authentication); @Override OAuth2AccessToken readAccessToken(final String accessToken); @Override void removeAccessToken(final String accessToken); @Override void removeAccessTokenUsingRefreshToken(String refreshToken); @Override void deleteExpiredToken(int expirationTime); @Override OAuth2RefreshToken readRefreshToken(String tokenValue); @Override OAuth2Authentication readAuthenticationForRefreshToken(OAuth2RefreshToken refreshToken);  }### Answer:
@Test public void findTokensByClientIdAndUserName() throws Exception { this.executeFindTokens("client_id", "username"); }