@Test
void parseEnum() {

    assertThat(PathParamHelper.toEnum("V1", TestEnum.class)).isEqualTo(TestEnum.VALUE);
    assertThatThrownBy(() -> PathParamHelper.toEnum("V2", TestEnum.class))
            .isInstanceOf(BadRequestException.class)
            .hasMessageContaining("failed to parse enum");
}