Create Gain_test_code