@Test
  public void testEmptyTable() throws Exception {
    createEntity(1L, "h1", "global", "version1");

    HostEntity hostEntity = hostDAO.findByName("h1");
    hostConfigMappingDAO.removeByClusterAndHostName(1L, "h1");
    HostConfigMapping target = hostConfigMappingDAO.findSelectedByType(1L, hostEntity.getHostId(), "core-site");
    
    Assert.assertEquals(null, target);
  }
Tests host config mapping DAO and Entities
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAOTest.java