Added test case generator from legacy code