Implement property-based testing with libraries like fast-check or Hypothesis
Implement property-based testing for:
**Language:** {{LANGUAGE}}
**Library:** {{LIBRARY}} (fast-check/Hypothesis/QuickCheck/jqwik)
**Code Under Test:**
```
{{CODE_TO_TEST}}
```
**Property-Based Test Design:**
1. **Identify Properties:**
- Invariants that always hold
- Symmetry properties (encode/decode)
- Idempotence properties
- Commutativity
- Associativity
2. **Generator Design:**
- Built-in generators
- Custom generators
- Constrained generators
- Composed generators
3. **Shrinking:**
- Automatic shrinking
- Custom shrinkers
- Shrinking strategies
4. **Test Categories:**
- Pure function properties
- State machine testing
- Model-based testing
- Metamorphic relations
5. **Integration with Unit Tests:**
- When to use property tests
- Combining example and property tests
- Coverage considerations
**Generate:**
- Property definitions
- Custom generators
- Complete test file
- Failure investigation guide
- Best practices documentationOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{LIBRARY][{CODE_TO_TEST]