An API for populating a database in unit tests