@Before
   public void setup() throws AmbariException{
    injector = Guice.createInjector(new InMemoryDefaultTestModule());
    injector.getInstance(GuiceJpaInitializer.class);
    
    hostConfigMappingDAO = injector.getInstance(HostConfigMappingDAO.class);
    hostDAO = injector.getInstance(HostDAO.class);
  }
Tests host config mapping DAO and Entities
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAOTest.java