A seam is a place where behavior can be changed without editing the code at that point. In legacy code, it lets you separate business logic from an external dependency so tests can run without real infrastructure. section 7.3.2
Substituting an external dependency
When business logic directly calls a database, API, or filesystem, put that dependency behind an interface or overridable method. Production uses the real implementation; a test supplies a mock. The business logic stays the same, while feedback can shrink from minutes to milliseconds. section 7.3.2
Add a seam where it reduces friction in a change path; the boundary has a cost, so consider how often the code changes and how much testing currently slows feedback. section 7.3.2


