@Test
public void testGetPropertyInfoMap() {

  AbstractPropertyProvider provider = new TestPropertyProvider(PropertyHelper.getMetricPropertyIds(Resource.Type.HostComponent));
  // specific property
  Map<String, PropertyInfo> propertyInfoMap = provider.getPropertyInfoMap("NAMENODE", "metrics/cpu/cpu_aidle");
  Assert.assertEquals(1, propertyInfoMap.size());
  Assert.assertTrue(propertyInfoMap.containsKey("metrics/cpu/cpu_aidle"));
  // category
  propertyInfoMap = provider.getPropertyInfoMap("NAMENODE", "metrics/disk");
  Assert.assertEquals(3, propertyInfoMap.size());
  Assert.assertTrue(propertyInfoMap.containsKey("metrics/disk/disk_free"));
  Assert.assertTrue(propertyInfoMap.containsKey("metrics/disk/disk_total"));
  Assert.assertTrue(propertyInfoMap.containsKey("metrics/disk/part_max_used"));
}