value) ->toBe($validUuid) ->and((string) $entityId)->toBe($validUuid); }); it('throws a DomainException when instantiated with an empty string', function (): void { // GIVEN $invalidUuid = ''; // WHEN & THEN expect(fn () => new readonly class ($invalidUuid) extends EntityId { })->toThrow(\DomainException::class); }); });