### Question:
MessengerServiceImpl implements MessengerService { @Override public int seenMessage(Messenger messenger) { Query query = em.createQuery("UPDATE Messenger a SET a.seenreceive = :true WHERE a.msg = :message AND a.sendId = :sendId AND a.receiveId = :receiveId"); query.setParameter("true", true).setParameter("message", messenger.getMsg()).setParameter("sendId", messenger.getSendId()).setParameter("receiveId", messenger.getReceiveId()).executeUpdate(); return 0; }  @Override List<Messenger> getAll(); @Override void addMessenger(Messenger messenger); @Override List<Messenger> getMessenger(String sendId, String receiveId); @Override int seenMessage(Messenger messenger); @Override List<Object> getInfo(String userId);  }### Answer:
@Test void seenMessageTest() { Messenger Messenger4 = new Messenger("Hellow","3234","3235"); em.persist(Messenger4); List<Messenger> messengers = Messengerserviceimpl.getMessenger("3234", "3235"); Messenger messageToChange = messengers.get(0); messageToChange.setSeenReceive(false); Messengerserviceimpl.seenMessage(messageToChange); boolean answer = false; List<Messenger> messengers2 = Messengerserviceimpl.getMessenger("3234", "3235"); for (Messenger m : messengers2) { if (m.getMsg() == messageToChange.getMsg()){ answer = m.getSeenReceive(); } } assertEquals(false,answer); }