The helper's own contract — marker handling, requested position, label extraction and the rejection when the marker is absent — is asserted against in-memory documents whose contextual types are written inline, so the helper is tested without coupling to the library's code.