@Test
public void grantBasicRoleTest() {

	User grantBasicRole = oadrSecurityRoleService.grantBasicRole("passUser", "passUser");
	List<GrantedAuthority> authorities = new ArrayList<>(grantBasicRole.getAuthorities());
	assertEquals(1, authorities.size());
	assertEquals("ROLE_USER", authorities.get(0).getAuthority());
	grantBasicRole = oadrSecurityRoleService.grantBasicRole(appUser.getUsername(), appUser.getUsername());
	authorities = new ArrayList<>(grantBasicRole.getAuthorities());
	assertEquals(2, authorities.size());
	assertTrue(authorities.get(0).getAuthority().equals("ROLE_APP")
			|| authorities.get(0).getAuthority().equals("ROLE_DEVICE_MANAGER"));
	assertTrue(authorities.get(1).getAuthority().equals("ROLE_APP")
			|| authorities.get(1).getAuthority().equals("ROLE_DEVICE_MANAGER"));
	grantBasicRole = oadrSecurityRoleService.grantBasicRole(adminUser.getUsername(), adminUser.getUsername());
	authorities = new ArrayList<>(grantBasicRole.getAuthorities());
	assertEquals(2, authorities.size());
	assertTrue(authorities.get(0).getAuthority().equals("ROLE_USER")
			|| authorities.get(0).getAuthority().equals("ROLE_ADMIN"));
	assertTrue(authorities.get(1).getAuthority().equals("ROLE_USER")
			|| authorities.get(1).getAuthority().equals("ROLE_ADMIN"));
	boolean exception = false;
	try {
		oadrSecurityRoleService.grantBasicRole("passUser", "mouaiccool");
	} catch (Exception e) {
		exception = true;
	}
	assertTrue(exception);
}