xUnit Test Patterns: Contract Test — https://zalas.pl/contract-test/
Contract Tests are examples that describe the behaviour of an abstraction by expressing what cannot be encoded in the type system. These are typically helpful in testing adapters as defined in the Ports & Adapters architecture.
Examples in #kotlin, but the pattern is universal.