Resource platform = discoverPlatform();
// @TODO change to get other Datasources, String would be different.
Resource jonDs = null;//findService("RHQDS", SERVER_JON, platform);
Resource defaultDs = null;//findService("DefaultDS", SERVER_JON, platform);
DiscoveryAgentService discoveryService = PluginContainer.getInstance().getDiscoveryAgentService();
Availability availability;
availability = discoveryService.getAvailability(jonDs);
assert availability != null : "Availability was returned as null";
assert availability.getResource().getId() == jonDs.getId() : "Incorrect resource ID associated with availability";
assert availability.getAvailabilityType() == AvailabilityType.UP : "Mock default value for availability was set incorrectly";
availability = discoveryService.getAvailability(defaultDs);
assert availability != null : "Availability was returned as null";
assert availability.getResource().getId() == defaultDs.getId() : "Incorrect resource ID associated with availability";
assert availability.getAvailabilityType() == AvailabilityType.DOWN : "Mock did not set availability to down correctly";
}