}
@Test
public void discoverStorageNode() {
InventoryManager inventoryManager = PluginContainer.getInstance().getInventoryManager();
InventoryReport inventoryReport = inventoryManager.executeServerScanImmediately();
if (inventoryReport.getAddedRoots().isEmpty()) {
// could be empty if the storage node is already in inventory from
// a prior discovery scan.
Resource platform = inventoryManager.getPlatform();
storageNode = findCassandraNode(platform.getChildResources(), "127.0.0.1");
} else {
storageNode = findCassandraNode(inventoryReport.getAddedRoots(), "127.0.0.1");
}
assertNotNull(storageNode, "Failed to discover Storage Node instance");
assertNodeIsUp("Expected " + storageNode + " to be UP after discovery");
}