@Test public void testInvalidMacroHint() throws Exception { final ComponentManager mockRootComponentManager = registerMockComponent(ComponentManager.class, "context"); MacroManager macroManager = getMockedComponent(); final Logger logger = getMockLogger(); getMockery().checking(new Expectations() {{ allowing(mockRootComponentManager).getInstance(ComponentManager.class, "context"); will(returnValue(mockRootComponentManager)); allowing(mockRootComponentManager).getInstanceMap(Macro.class); will(returnValue(Collections.singletonMap("macro/invalidsyntax", "dummy"))); oneOf(logger).warn("Invalid Macro descriptor format for hint " + "[{}]. The hint should contain either the macro name only or the macro name " + "followed by the syntax for which it is valid. In that case the macro name should be followed by " + "a \"/\" followed by the syntax name followed by another \"/\" followed by the syntax version. " + "For example \"html/xwiki/2.0\". This macro will not be available in the system.", "macro/invalidsyntax"); }}); macroManager.getMacroIds(Syntax.valueOf("macro/xwiki/2.0")); }
@Override public Set<MacroId> getMacroIds() throws MacroLookupException { return getMacroIds(null); }
DefaultMacroManager implements MacroManager { @Override public Set<MacroId> getMacroIds() throws MacroLookupException { return getMacroIds(null); } }
DefaultMacroManager implements MacroManager { @Override public Set<MacroId> getMacroIds() throws MacroLookupException { return getMacroIds(null); }  }
DefaultMacroManager implements MacroManager { @Override public Set<MacroId> getMacroIds() throws MacroLookupException { return getMacroIds(null); }  @Override Set<MacroId> getMacroIds(); @Override Set<MacroId> getMacroIds(Syntax syntax); @Override Macro<?> getMacro(MacroId macroId); @Override boolean exists(MacroId macroId); }
DefaultMacroManager implements MacroManager { @Override public Set<MacroId> getMacroIds() throws MacroLookupException { return getMacroIds(null); }  @Override Set<MacroId> getMacroIds(); @Override Set<MacroId> getMacroIds(Syntax syntax); @Override Macro<?> getMacro(MacroId macroId); @Override boolean exists(MacroId macroId);  }