### Question:
PmdLevelUtils { public static RulePriority fromLevel(@Nullable Integer level) { if (Objects.isNull(level)) { return null; } final int index = Math.abs(INDEX_LEVEL - level); return (index < INDEX_LEVEL) ? RulePriority.valueOfInt(index) : null; } private  PmdLevelUtils(); static RulePriority fromLevel(@Nullable Integer level); static Integer toLevel(RulePriority priority);  }### Answer:
@Test void should_get_priority_from_level() { assertThat(PmdLevelUtils.fromLevel(1)).isSameAs(BLOCKER); assertThat(PmdLevelUtils.fromLevel(2)).isSameAs(CRITICAL); assertThat(PmdLevelUtils.fromLevel(3)).isSameAs(MAJOR); assertThat(PmdLevelUtils.fromLevel(4)).isSameAs(MINOR); assertThat(PmdLevelUtils.fromLevel(5)).isSameAs(INFO); assertThat(PmdLevelUtils.fromLevel(-1)).isNull(); assertThat(PmdLevelUtils.fromLevel(null)).isNull(); }