code cleanup & schema generation in test module
specific testcase for Bug #1