Define and test a consistent API for building a file