public A hasName(String expectedName) {
    isNotNull();
    Meter.Id actualId = actualId();
    if (actualId == null) {
      failWithMessage("Expected meter to have name <%s> but id was null", expectedName);
    }
    String meterName = actualId.getName();
    if (!Objects.equals(meterName, expectedName)) {
      failWithMessage("Expected meter to have name <%s> but name was <%s>", expectedName,
          meterName);
    }
    return myself;
  }
Verifies that the meter has the given name.

@param expectedName the expected name
@return this assertion object
@throws AssertionError if the meter is {@code null}
@throws AssertionError if the meter's name is not equal to the given name
geode-junit/src/main/java/org/apache/geode/test/micrometer/AbstractMeterAssert.java