@Category(InternetTest.class)
@Test
public void testCreateUserwithPassword() throws EnMeExpcetion {
createDefaultPermission();
UserAccount secCreateUser = new UserAccount();
UserAccountBean userCreateBean = ConvertDomainBean
.convertSecondaryUserToUserBean(secCreateUser);
userCreateBean.setPassword("12345");
userCreateBean.setEmail("demo1@demo.org");
userCreateBean.setUsername("demo1");
userCreateBean.setStatus(true);
userCreateBean.setName("Diana Paola");
userCreateBean.setDateNew(new Date());
userCreateBean.setPrimaryUserId(createAccount().getUid());
securityService.createUser(userCreateBean,
this.userAccount.getUsername());
// TODO: need assert
final UserAccount user = getAccountDao().getUserByUsername(
userCreateBean.getUsername());
assertNotNull("should be equals", user);
assertEquals("should be equals", 1, user.getSecUserPermissions().size());
}