@Test
public void testAssignPermissionwithIdUsername() throws EnMeExpcetion {
final UserAccount secUser = createUserAccount("demo", this.userPrimary);
final UserAccountBean userPermissionBean = ConvertDomainBean
.convertSecondaryUserToUserBean(secUser);
final UnitPermission permissionBean = ConvertDomainBean
.convertPermissionToBean(this.permission);
userPermissionBean.setId(userPermissionBean.getId());
userPermissionBean.setUsername("demo");
securityService.assignPermission(userPermissionBean, permissionBean);
assertEquals("should be equals", 1, secUser.getSecUserPermissions()