@Test
  public void testCreate() throws Exception {
    final EntityTransaction tx = entityManager.getTransaction();
    tx.begin();
    final User frank = createUser.create(new CredentialsVO("createdUser", "strongP@ass001"));
    tx.commit();

    final User persistedUser = entityManager.find(User.class, frank.getId());

    assertEquals("The right user was loaded from database", frank, persistedUser);
  }
 @Override
 public UserProfile getByUser(User user) {
   return getByUser(user.getId());
 }