@Before
  public void before() {
    injector = Guice.createInjector(new InMemoryDefaultTestModule());
    H2DatabaseCleaner.resetSequences(injector);
    injector.getInstance(GuiceJpaInitializer.class);

    stackDAO = injector.getInstance(StackDAO.class);
    repositoryVersionDAO = injector.getInstance(RepositoryVersionDAO.class);

    // required to populate stacks into the database
    injector.getInstance(AmbariMetaInfo.class);
  }
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