private boolean exemptedByName(Name name) {
    String nameString = name.toString();
    String nameStringLower = Ascii.toLowerCase(nameString);
    return exemptPrefixes.stream().anyMatch(nameStringLower::startsWith)
        || exemptNames.contains(nameString);
  }
@Test
  public void exemptedByName() {
    helper
        .addSourceLines(
            "Unuseds.java",
            "package unusedvars;",
            "class ExemptedByName {",
            "  private int unused;",
            "  private int unusedInt;",
            "  private static final int UNUSED_CONSTANT = 5;",
            "  private int ignored;",
            "  private int customUnused1;",
            "  private int customUnused2;",
            "  private int prefixUnused1Field;",
            "  private int prefixUnused2Field;",
            "}")
        .setArgs(
            "-XepOpt:Unused:exemptNames=customUnused1,customUnused2",
            "-XepOpt:Unused:exemptPrefixes=prefixunused1,prefixunused2")
        .doTest();
  }