@Test
public void getActionDefinitions() throws Exception {

    int numTenants = 2;
    int numPlugins = 2;
    int numActions = 4;
    createTestPluginsAndActions(numTenants, numPlugins, numActions);
    assertEquals(2 * 2 * 4, definitions.getAllActionDefinitions().size());
    Map<String, Map<String, Set<String>>> actionIds = definitions.getAllActionDefinitionIds();
    assertEquals(numTenants, actionIds.keySet().size());
    assertEquals(numPlugins, actionIds.get("tenant0").keySet().size());
    assertEquals(numActions, actionIds.get("tenant0").get("plugin0").size());
    Map<String, Set<String>> actionIdsByTenant = definitions.getActionDefinitionIds("tenant1");
    assertEquals(numPlugins, actionIdsByTenant.keySet().size());
    Collection<String> actionIdsByTenantAndPlugin = definitions.getActionDefinitionIds("tenant1", "plugin1");
    assertEquals(numActions, actionIdsByTenantAndPlugin.size());
    deleteTestPluginsAndActions(numTenants, numPlugins, numActions);
}