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