public void execute() throws Exception {
EntityManager entityManager = getEntityManager();
String name = "test-repo-type";
RepoGroupType groupType = new RepoGroupType(name);
entityManager.persist(groupType);
entityManager.flush();
// Test
RepoGroupType type = repoManager.getRepoGroupTypeByName(overlord, name);
assert type != null;
assert type.getName().equals(name);
// Cleanup
type = entityManager.find(RepoGroupType.class, type.getId());
entityManager.remove(type);
entityManager.flush();
}
});
}