@Test
  public void testDuplicatePointInTimeMetrics() {
    TreeSet<String> set = new TreeSet<>();

    for (Resource.Type type : Resource.Type.values()) {

      Map<String, Map<String, PropertyInfo>> gids = PropertyHelper.getMetricPropertyIds(type);

      Map<String, Map<String, PropertyInfo>> jids = PropertyHelper.getJMXPropertyIds(type);

      if (gids != null && jids != null) {

        gids = normalizeMetricNames(gids);
        jids = normalizeMetricNames(jids);

        for (Map.Entry<String, Map<String, PropertyInfo>> gComponentEntry : gids.entrySet()) {

          String gComponent = gComponentEntry.getKey();

          Set<Map.Entry<String, PropertyInfo>> gComponentEntries = gComponentEntry.getValue().entrySet();

          for (Map.Entry<String, PropertyInfo> gMetricEntry : gComponentEntries) {

            Map<String, PropertyInfo> jMetrics = jids.get(gComponent);

            if (jMetrics != null) {
              String gMetric = gMetricEntry.getKey();
              PropertyInfo jProperty = jMetrics.get(gMetric);

              if (jProperty != null) {
                PropertyInfo gProperty = gMetricEntry.getValue();
                if (gProperty.isPointInTime()) {
                  String s = type + " : " + gComponent + " : " + gMetric + " : " + gProperty.getPropertyId();
                  set.add(s);
                }
              }
            }
          }
        }
      }
    }
    if (set.size() > 0) {
      System.out.println("The following point in time metrics are defined for both JMX and Ganglia.");
      System.out.println("The preference is to get point in time metrics from JMX only if possible.");
      System.out.println("If the metric can be obtained from JMX then set \"pointInTime\" : false for ");
      System.out.println("the metric in the Ganglia properties definition, otherwise remove the metric ");
      System.out.println("from the JMX properties definition.\n");
      for (String s : set) {
        System.out.println(s);
      }
      Assert.fail("Found duplicate point in time metrics.");
    }
  }
Test to make sure that point in time metrics are not in both JMX and Ganglia.
A metric marked as point in time should not be available from both JMX
and Ganglia.  The preference is to get point in time metrics from JMX
but they may come from Ganglia if not available from JMX.

If there is a legitimate exception and the point in time metric should
be available from both property providers then please add an exception to
this test.
ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java