@Test
public void testGetResourcesCheckOrder() throws Exception{

  ClusterControllerImpl controller = new ClusterControllerImpl(new TestProviderModule());
  Set<String> propertyIds = new HashSet<String>();
  Request request = PropertyHelper.getReadRequest(propertyIds);
  Iterable<Resource> iterable = controller.getResourceIterable(Resource.Type.Host, request, null);
  String lastHostName = null;
  int cnt = 0;
  for (Resource resource : iterable) {
    Assert.assertEquals(Resource.Type.Host, resource.getType());
    String hostName = (String) resource.getPropertyValue(PropertyHelper.getPropertyId("Hosts", "host_name"));
    if (lastHostName != null) {
      Assert.assertTrue(hostName.compareTo(lastHostName) > 0);
    }
    lastHostName = hostName;
    ++cnt;
  }
  Assert.assertEquals(4, cnt);
}