@Test
public void setMultiHop() throws PersistenceException {

    // Add a message unit to the database so we can change it
    em.getTransaction().begin();
    ErrorMessage errorMsgJPA = new ErrorMessage(TestData.error3);
    em.persist(errorMsgJPA);
    ErrorMessageEntity errorMsg = new ErrorMessageEntity(errorMsgJPA);
    em.getTransaction().commit();
    // Check it accidentially has not already the new value
    assertNotEquals(T_NEW_MULTI_HOP, errorMsg.usesMultiHop());
    // Perform the update
    updManager.setMultiHop(errorMsg, T_NEW_MULTI_HOP);
    // Check update in entity object
    assertEquals(T_NEW_MULTI_HOP, errorMsg.usesMultiHop());
    // Check that database is updated
    em.refresh(errorMsgJPA);
    assertEquals(T_NEW_MULTI_HOP, errorMsgJPA.usesMultiHop());
}