public static void checkNewCodeDefinitionParam(@Nullable String newCodeDefinitionType, @Nullable String newCodeDefinitionValue) {
    if (newCodeDefinitionType == null && newCodeDefinitionValue != null) {
      throw new IllegalArgumentException("New code definition type is required when new code definition value is provided");
    }
  }
@Test
  public void checkNewCodeDefinitionParam_do_not_throw_when_both_value_and_type_are_provided() {
    assertThatNoException()
      .isThrownBy(() -> newCodeDefinitionResolver.checkNewCodeDefinitionParam("PREVIOUS_VERSION", "anyvalue"));
  }