NpcIndicatorsPlugin extends Plugin { @VisibleForTesting List<String> getHighlights() { final String configNpcs = config.getNpcToHighlight(); if (configNpcs.isEmpty()) { return Collections.emptyList(); } return Text.fromCSV(configNpcs); }  @Subscribe void onGameStateChanged(GameStateChanged event); @Subscribe void onConfigChanged(ConfigChanged configChanged); @Subscribe void onMenuEntryAdded(MenuEntryAdded event); @Subscribe void onMenuOptionClicked(MenuOptionClicked click); @Subscribe void onNpcSpawned(NpcSpawned npcSpawned); @Subscribe void onNpcDespawned(NpcDespawned npcDespawned); @Subscribe void onGraphicsObjectCreated(GraphicsObjectCreated event); @Subscribe void onGameTick(GameTick event);  }
@Test public void getHighlights() { when(npcIndicatorsConfig.getNpcToHighlight()).thenReturn("goblin, , zulrah , *wyvern, ,"); final List<String> highlightedNpcs = npcIndicatorsPlugin.getHighlights(); assertEquals("Length of parsed NPCs is incorrect", 3, highlightedNpcs.size()); final Iterator<String> iterator = highlightedNpcs.iterator(); assertEquals("goblin", iterator.next()); assertEquals("zulrah", iterator.next()); assertEquals("*wyvern", iterator.next()); }