OwnerCurator extends AbstractHibernateCurator<Owner> { @Transactional public Owner replicate(Owner owner) { this.currentSession().replicate(owner, ReplicationMode.EXCEPTION); return owner; } OwnerCurator(); Owner findOwnerById(String ownerId); @Transactional Owner replicate(Owner owner); @Transactional @Override Owner create(Owner entity); @Transactional Owner getByKeySecure(String key); Owner lockAndLoadByKey(String key); @Transactional Owner getByKey(String key); @Transactional CandlepinQuery<Owner> getByKeys(Collection<String> keys); Owner getByUpstreamUuid(String upstreamUuid); CandlepinQuery<Owner> getOwnersByActiveProduct(Collection<String> productIds); @SuppressWarnings("checkstyle:indentation") CandlepinQuery<Owner> getOwnersWithProducts(Collection<String> productIds); CandlepinQuery<String> getConsumerIds(Owner owner); @SuppressWarnings("unchecked") CandlepinQuery<String> getConsumerIds(String ownerId); CandlepinQuery<String> getConsumerUuids(Owner owner); @SuppressWarnings("unchecked") CandlepinQuery<String> getConsumerUuids(String ownerId);  }
@Test public void basicImport() { Owner owner = new Owner("testing"); owner.setId("testing-primary-key"); this.ownerCurator.replicate(owner); assertEquals("testing", this.ownerCurator.get("testing-primary-key").getKey()); }