code: protected void verifyName(final String expectedName) {
          readBsonType();
          String actualName = readName();
          if (!actualName.equals(expectedName)) {
              throw new BsonSerializationException(format("Expected element name to be '%s', not '%s'.",
                                                          expectedName, actualName));
          }
      }
docs: Verifies the name of the current element.
  
  @param expectedName The expected name.
  @throws BsonSerializationException when the name read is not the expected name