assertThat(updated.getVersion(), is(11L));
}
private UserAgentDTO persist(final String uaid, final String channelId, final long version, final String endpointUrl) {
entityManager.getTransaction().begin();
final UserAgentDTO userAgent = new UserAgentDTO(uaid.toString());
userAgent.addChannel(channelId, version, endpointUrl);
entityManager.persist(userAgent);
assertThat(entityManager.contains(userAgent), is(true));
entityManager.getTransaction().commit();
return userAgent;