simple test generator, some general utilities