### Question:
ChatFilterPlugin extends Plugin { @VisibleForTesting boolean shouldFilterByName(final String playerName) { String sanitizedName = Text.standardize(playerName); for (Pattern pattern : filteredNamePatterns) { Matcher m = pattern.matcher(sanitizedName); if (m.find()) { return true; } } return false; }  @Subscribe void onChatMessage(ChatMessage chatMessage);  }### Answer:
@Test public void testShouldFilterByName() { when(chatFilterConfig.filteredNames()).thenReturn("Gamble [0-9]*"); chatFilterPlugin.updateFilteredPatterns(); assertTrue(chatFilterPlugin.shouldFilterByName("Gamble 1234")); assertFalse(chatFilterPlugin.shouldFilterByName("Adam")); }