make aes test code adapt to different test environment