StudioWebHelpProvider extends WebHelpProvider { @Nullable @Override public String getHelpPageUrl(@NotNull String helpTopicIdWithPrefix) { assert helpTopicIdWithPrefix.startsWith(StudioHelpManagerImpl.STUDIO_HELP_PREFIX); String topicIdWithNoPrefix = helpTopicIdWithPrefix.substring(StudioHelpManagerImpl.STUDIO_HELP_PREFIX.length()); if (topicIdWithNoPrefix.startsWith("reference.dialogs.rundebug.Android")) { return studioWebHelpUrl("r/studio-ui/rundebugconfig.html"); } return studioWebHelpUrl(topicIdWithNoPrefix); }  @Nullable @Override String getHelpPageUrl(@NotNull String helpTopicIdWithPrefix); @NotNull @Override String getHelpTopicPrefix();  }
@Test public void testStudioHelpPrefix() { StudioWebHelpProvider inst = new StudioWebHelpProvider(); String resolvedUrl = inst.getHelpPageUrl(STUDIO_HELP_PREFIX + "test"); assertEquals(STUDIO_HELP_URL + "test", resolvedUrl); }
@Test public void testStudioHelpSpecialCase() { StudioWebHelpProvider inst = new StudioWebHelpProvider(); String resolvedUrl = inst.getHelpPageUrl(STUDIO_HELP_PREFIX + "reference.dialogs.rundebug.Android"); assertEquals(STUDIO_HELP_URL + "r/studio-ui/rundebugconfig.html", resolvedUrl); }