Repository: open-telemetry/opentelemetry-java
File: sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LogRecordDataAssert.java (Java)

Code before:

  /**
   * Asserts the {@link InstrumentationScopeInfo} associated with a log matches the expected value.
   */
  public LogRecordDataAssert hasInstrumentationScope(
      InstrumentationScopeInfo instrumentationScopeInfo) {
    isNotNull();
    if (!actual.getInstrumentationScopeInfo().equals(instrumentationScopeInfo)) {
      failWithActualExpectedAndMessage(
          actual,
          "instrumentation scope: " + instrumentationScopeInfo,
          "Expected log to have scope <%s> but found <%s>",
          instrumentationScopeInfo,
          actual.getInstrumentationScopeInfo());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code timestamp}. */
  public LogRecordDataAssert hasEventName(String eventName) {
    isNotNull();
    if (!eventName.equals(actual.getEventName())) {
      failWithActualExpectedAndMessage(
          actual.getEventName(),
          eventName,
          "Expected log to have eventName <%s> nanos but was <%s>",
          eventName,
          actual.getEventName());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code timestamp}. */
  public LogRecordDataAssert hasTimestamp(long timestampEpochNanos) {
    isNotNull();
    if (actual.getTimestampEpochNanos() != timestampEpochNanos) {
      failWithActualExpectedAndMessage(
          actual.getTimestampEpochNanos(),
          timestampEpochNanos,
          "Expected log to have timestamp <%s> nanos but was <%s>",
          timestampEpochNanos,
          actual.getTimestampEpochNanos());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code observedTimestamp}. */
  public LogRecordDataAssert hasObservedTimestamp(long observedEpochNanos) {
    isNotNull();
    if (actual.getObservedTimestampEpochNanos() != observedEpochNanos) {
      failWithActualExpectedAndMessage(

Review comment (suggestion):
```suggestion
          "Expected log to have eventName <%s> but was <%s>",
```

Code after:

  /**
   * Asserts the {@link InstrumentationScopeInfo} associated with a log matches the expected value.
   */
  public LogRecordDataAssert hasInstrumentationScope(
      InstrumentationScopeInfo instrumentationScopeInfo) {
    isNotNull();
    if (!actual.getInstrumentationScopeInfo().equals(instrumentationScopeInfo)) {
      failWithActualExpectedAndMessage(
          actual,
          "instrumentation scope: " + instrumentationScopeInfo,
          "Expected log to have scope <%s> but found <%s>",
          instrumentationScopeInfo,
          actual.getInstrumentationScopeInfo());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code eventName}. */
  public LogRecordDataAssert hasEventName(String eventName) {
    isNotNull();
    if (!eventName.equals(actual.getEventName())) {
      failWithActualExpectedAndMessage(
          actual.getEventName(),
          eventName,
          "Expected log to have eventName <%s> but was <%s>",
          eventName,
          actual.getEventName());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code timestamp}. */
  public LogRecordDataAssert hasTimestamp(long timestampEpochNanos) {
    isNotNull();
    if (actual.getTimestampEpochNanos() != timestampEpochNanos) {
      failWithActualExpectedAndMessage(
          actual.getTimestampEpochNanos(),
          timestampEpochNanos,
          "Expected log to have timestamp <%s> nanos but was <%s>",
          timestampEpochNanos,
          actual.getTimestampEpochNanos());
    }
    return this;
  }

  /** Asserts the log has the given epoch {@code observedTimestamp}. */
  public LogRecordDataAssert hasObservedTimestamp(long observedEpochNanos) {
    isNotNull();
    if (actual.getObservedTimestampEpochNanos() != observedEpochNanos) {
      failWithActualExpectedAndMessage(