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

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

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

      if (jids != null) {

        for (Map.Entry<String, Map<String, PropertyInfo>> jComponentEntry : jids.entrySet()) {

          String jComponent = jComponentEntry.getKey();

          Set<Map.Entry<String, PropertyInfo>> jComponentEntries = jComponentEntry.getValue().entrySet();
          for (Map.Entry<String, PropertyInfo> jMetricEntry : jComponentEntries) {

            String jMetric = jMetricEntry.getKey();

            PropertyInfo jProperty = jMetricEntry.getValue();

            if (jProperty.isTemporal()) {
              String s = type + " : " + jComponent + " : " + jMetric + " : " + jProperty.getPropertyId();

              set.add(s);
            }
          }
        }
      }
    }

    if (set.size() > 0) {
      System.out.println("The following metrics are marked as temporal JMX.");
      System.out.println("JMX can provide point in time metrics only.\n");
      for (String s : set) {
        System.out.println(s);
      }
      Assert.fail("Found temporal JMX metrics.");
    }
  }
Test to make sure that no JMX metrics are marked as point in time.
ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java