private void createSingleRecord() {
    StackEntity stackEntity = stackDAO.find(HDP_206.getStackName(),
        HDP_206.getStackVersion());

    Assert.assertNotNull(stackEntity);

    final RepositoryVersionEntity entity = new RepositoryVersionEntity();
    entity.setDisplayName("display name" + uniqueCounter);
    entity.addRepoOsEntities(new ArrayList<>());
    entity.setStack(stackEntity);
    entity.setVersion("version" + uniqueCounter);
    repositoryVersionDAO.create(entity);
    uniqueCounter++;
  }
CrudDAO unit tests.
Uses repo_version table for in-memory DB tests.
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/CrudDAOTest.java