### Question:
UserServiceImpl implements UserService { @Override public String updateImage(Users us) { Users u = getByIdUser(us.getId()); if (!(u.getId().contentEquals("0000"))) { Query query = em.createQuery( "UPDATE Users a SET a.image = :image " + whereId); query.setParameter("id", us.getId()).setParameter("image",us.getImage()).executeUpdate(); return "Image changed"; } else { em.persist(us); return "user added and image updated"; } }  @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 updateImageTest() { Users user1 = new Users("12377321","",0,""); Users user2 = new Users("12377321","1234",0,""); Users user3 = new Users("12377323","123",0,""); em.persist(user1); String msg1 = Userserviceimpl.updateImage(user2); String msg2 = Userserviceimpl.updateImage(user3); assertEquals("Image changed",msg1); assertEquals("user added and image updated",msg2); }