@Override
	public Set<OAuth2AccessTokenEntity> getAccessTokensByUserName(String name) {
		TypedQuery<OAuth2AccessTokenEntity> query = manager.createNamedQuery(OAuth2AccessTokenEntity.QUERY_BY_NAME, OAuth2AccessTokenEntity.class);
	    query.setParameter(OAuth2AccessTokenEntity.PARAM_NAME, name);
	    List<OAuth2AccessTokenEntity> results = query.getResultList();
	    return results != null ? new HashSet<>(results) : new HashSet<>();
	}
@Test
	public void testGetAccessTokensByUserName() {
		Set<OAuth2AccessTokenEntity> tokens = repository.getAccessTokensByUserName("user1");
		assertEquals(2, tokens.size());
		assertEquals("user1", tokens.iterator().next().getAuthenticationHolder().getUserAuth().getName());
	}