Relocate test generation block code