Test script for gen and recevier