### Question:
UserServiceImpl implements UserService { @Override public String create(Users us) { if (!em.contains(us)) { userproducer.sendUserbyid(us.getId(), "adduser"); em.persist(us); return us.getId(); }else { if (us.getName() == null) { Query query = em.createQuery( "UPDATE Users a SET a.name = :name, a.surname = :surname, a.email = :email "+ whereId); query.setParameter("id", us.getId()).setParameter("email", us.getEmail()).setParameter("name", us.getName()).setParameter("surname", us.getSurname()).executeUpdate(); return "update user"; } } return "user already exist"; }  @Override List<Users> getAll(); @Override String create(Users us); @Override Users getByIdUser(String id); @Override String incrementReport(String id,String idreport); @Override String updateImage(Users us);  }### Answer:
@Test void createTest() { em.clear(); int size = Userserviceimpl.getAll().size(); Users user1 = new Users("1237","",0,""); em.persist(user1); Userserviceimpl.create(user1); List<Users> users = Userserviceimpl.getAll(); assertEquals(size+1,users.size()); }