### Question:
PmdLevelUtils { public static String toLevel(RulePriority priority) { return LEVELS_PER_PRIORITY.get(priority); } private  PmdLevelUtils(); static RulePriority fromLevel(String level); static String toLevel(RulePriority priority);  }### Answer:
@Test public void should_get_level_from_priority() { assertThat(PmdLevelUtils.toLevel(RulePriority.BLOCKER)).isEqualTo("1"); assertThat(PmdLevelUtils.toLevel(RulePriority.CRITICAL)).isEqualTo("2"); assertThat(PmdLevelUtils.toLevel(RulePriority.MAJOR)).isEqualTo("3"); assertThat(PmdLevelUtils.toLevel(RulePriority.MINOR)).isEqualTo("4"); assertThat(PmdLevelUtils.toLevel(RulePriority.INFO)).isEqualTo("5"); }