@Test
  public void testGetLatestClusterConfigsWithTypes() throws Exception {
    initClusterEntities();
    ClusterEntity clusterEntity = clusterDAO.findByName("c1");
    List<ClusterConfigEntity> entities = clusterDAO.getLatestConfigurationsWithTypes(clusterEntity.getClusterId(), HDP_01, asList("oozie-site"));
    Assert.assertEquals(1, entities.size());
    entities = clusterDAO.getLatestConfigurationsWithTypes(clusterEntity.getClusterId(), HDP_01, asList("no-such-type"));
    Assert.assertTrue(entities.isEmpty());
    entities = clusterDAO.getLatestConfigurationsWithTypes(clusterEntity.getClusterId(), HDP_01, Collections.emptyList());
    Assert.assertTrue(entities.isEmpty());
  }
Tests the ability to find the latest configuration by stack, regardless of
whether that configuration is enabled.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java