ScreenshotPlugin extends Plugin { @VisibleForTesting static String parseBAHighGambleWidget(final String text) { final Matcher highGambleMatch = BA_HIGH_GAMBLE_REWARD_PATTERN.matcher(text); if (highGambleMatch.find()) { String gambleCount = highGambleMatch.group("gambleCount"); return String.format("High Gamble(%s)", gambleCount); } return "High Gamble(count not found)"; }  @Subscribe void onGameTick(GameTick event); @Subscribe void onActorDeath(ActorDeath actorDeath); @Subscribe void onPlayerLootReceived(final PlayerLootReceived playerLootReceived); @Subscribe void onScriptCallbackEvent(ScriptCallbackEvent e); @Subscribe void onChatMessage(ChatMessage event); @Subscribe void onWidgetLoaded(WidgetLoaded event);  }
@Test public void testBAHighGambleRewardParsing() { assertEquals("High Gamble(100)", ScreenshotPlugin.parseBAHighGambleWidget(BA_HIGH_GAMBLE_REWARD)); }