Most complex or volatile libraries should ship with two extra things: an abstract interface or protocol (whatever the language has), and a mock that implements it. Standard libraries of programming languages should lead by example, as engineers often look up to them when designing libraries.