SpanParser { protected static String getJsonEscapedValueForChar(char c) { if ((int)c >= JSON_ESCAPE_CHAR_MAPPINGS.length) { return null; } return JSON_ESCAPE_CHAR_MAPPINGS[c]; } protected  SpanParser(); static String convertSpanToJSON(Span span); static Span fromJSON(String json); static String convertSpanToKeyValueFormat(Span span); static Span fromKeyValueString(String keyValueStr); static String escapeJson(String orig); static String unescapeJson(String escaped); static final String TRACE_ID_FIELD; static final String PARENT_SPAN_ID_FIELD; static final String SPAN_ID_FIELD; static final String SPAN_NAME_FIELD; static final String SAMPLEABLE_FIELD; static final String USER_ID_FIELD; static final String SPAN_PURPOSE_FIELD; static final String START_TIME_EPOCH_MICROS_FIELD; static final String DURATION_NANOS_FIELD; static final String TAGS_FIELD; static final String ANNOTATIONS_LIST_FIELD; static final String ANNOTATION_SUBOBJECT_TIMESTAMP_FIELD; static final String ANNOTATION_SUBOBJECT_VALUE_FIELD; static final String KEY_VALUE_TAG_PREFIX; static final String KEY_VALUE_TIMESTAMPED_ANNOTATION_PREFIX; }
@DataProvider(value = { "true", "false" }) @Test public void getJsonEscapedValueForChar_returns_null_if_passed_int_value_outside_range_of_JSON_ESCAPE_CHAR_MAPPINGS_array( boolean exactArrayLength ) { int argValue = (exactArrayLength) ? SpanParser.JSON_ESCAPE_CHAR_MAPPINGS.length : SpanParser.JSON_ESCAPE_CHAR_MAPPINGS.length + 1; String result = SpanParser.getJsonEscapedValueForChar((char)argValue); assertThat(result).isNull(); }