assert entityManager.find(Resource.class, platform.getId()) != null : "Did not setup platform - cannot test";
assertResults(entityManager, fiveMinutesAgo, 0);
assertCount(entityManager, fiveMinutesAgo, 0);
ResourceAvailability resourceAvail = new ResourceAvailability(platform, AvailabilityType.DOWN);
entityManager.persist(resourceAvail);
Availability avail = new Availability(platform, AvailabilityType.DOWN);
entityManager.persist(avail);
//commitAndBegin();
results = assertResults(entityManager, fiveMinutesAgo, 1);
assertCount(entityManager, fiveMinutesAgo, 1);
assertComposite(results.get(0), platform, 0);
assert results.get(0).getAvailabilityType() == AvailabilityType.DOWN;
assertComposite(results.get(0), platform, 0);
assert results.get(0).getAvailabilityType() == AvailabilityType.DOWN;
ResourceAvailability resourceAvail2 = new ResourceAvailability(platform2, AvailabilityType.DOWN);
entityManager.persist(resourceAvail2);
Availability avail2 = new Availability(platform2, null, AvailabilityType.DOWN);
entityManager.persist(avail2);
//commitAndBegin();