UpdateManager implements IUpdateManager { @Override public void setPModeId(final IMessageUnitEntity msgUnit, final String pmodeId) throws PersistenceException { performUpdate((MessageUnitEntity) msgUnit, (MessageUnit jpaObject) -> { jpaObject.setPModeId(pmodeId); }); }  @Override V storeMessageUnit(final T messageUnit); @Override boolean setProcessingState(final IMessageUnitEntity msgUnit, final ProcessingState currentProcState,
                                      final ProcessingState newProcState); @Override boolean setProcessingState(final IMessageUnitEntity msgUnit, final ProcessingState currentProcState,
                                      final ProcessingState newProcState, final String description); @Override void deleteMessageUnit(final IMessageUnitEntity messageUnit); @Override void setPModeId(final IMessageUnitEntity msgUnit, final String pmodeId); @Override void setMultiHop(final IMessageUnitEntity msgUnit, final boolean isMultihop); @Override void setPayloadInformation(final IUserMessageEntity userMessage, final Collection<IPayload> payloadInfo); @Override void setAddSOAPFault(final IErrorMessageEntity errorMessage, final boolean addSOAPFault);  }
@Test public void setPModeId() throws PersistenceException { em.getTransaction().begin(); UserMessage userMsgJPA = new UserMessage(TestData.userMsg1); em.persist(userMsgJPA); UserMessageEntity userMsg = new UserMessageEntity(userMsgJPA); em.getTransaction().commit(); assertNotEquals(T_NEW_PMODE_ID_1, userMsg.getPModeId()); updManager.setPModeId(userMsg, T_NEW_PMODE_ID_1); assertEquals(T_NEW_PMODE_ID_1, userMsg.getPModeId()); em.refresh(userMsgJPA); assertEquals(T_NEW_PMODE_ID_1, userMsgJPA.getPModeId()); }