Add tests for corpus builder