Writing test and implementation of base string generator